Open MickSheppardWB opened 2 years ago
An additional note on the behaviour on destroy.
Because the ENIs are not deleted the destruction of the subnets and VPC fails.
Would https://github.com/hashicorp/terraform-provider-aws/issues/26568 make this easier to fix?
When I use the aws cli to delete an iot topic rule destination, it also deletes the created ENIs.
When I use terraform, it does not.
What I haven't tried is using the go sdk to delete the iot topic rule destination.
I think this bug is happening because the role that has permission to delete ENIs gets deleted before the topic rule destination is finished cleaning up. There's an acceptance test for the terraform provider which deletes everything except the IAM role, and that seems to clean up properly.
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.2.6 registry.terraform.io/hashicorp/aws 4.28.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
N/A
Panic Output
N/A
Expected Behavior
To be consistent with the AWS CLI and AWS Console when destroying the IOT Rule Destination it should delete the ENIs that are created during the apply.
Actual Behavior
On running
terraform destroy
the ENIs are detached but not deleted.Steps to Reproduce
terraform apply
terraform destroy
Important Factoids
References