-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform destroy bug #1472
Comments
Having same behavior on terraform v0.4.0 and 0.4.1. It tries to destroy security groups and launch configuration before destroy autoscale group which leads to fail.
|
Also seeing this bug since upgrading from 0.3.7 to 0.4.0+ |
Have a related issue with destruction of dependent resources, made even worse by using modules :( |
In my case I believe it is because there isn't any implicit dependency between my ec2 instances and the VPC. So, when destroying, I think it has to start by destroying the EC2 instances and then the subnets, internet gateways, the routing table and so on. |
Terraform 0.5.0 seems to destroy everything just fine now. However, it does show errors, even though everything was destroyed fine. See
|
@bensojona This was fixed in master, will be part of 0.5.1 coming out hopefully this week sometime |
Awesome 👍 |
I currently have an issue if a subnets creation failed (as in I configured the cidr incorrectly) I then cannot destroy/refresh/plan/apply again using Terraform 0.5. I get the error Is this related or a separate issue? Thanks. |
0.5.1/2 seems to have resolved my issues, subnet and security group destruction. Thanks! |
Terraform v0.6.3 is showing similar errors to what @bensojona was seeing for me:
|
I'm also having some destroy problems with terraform 0.6.2 :
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I have a TF template that creates a Consul cluster using a TF module that creates the consul aws_instance resource.
The aws_instance depends on an aws_security_group and an aws_key_pair
When I do a terraform apply, it brings up the consul cluster just fine, no errors. I then do a terraform plan everything looks just fine. Then I do a terraform destroy and it fails, which screws up my tfstate.
It appears there is some dependency between the aws_key_pair and aws_security_group where it destroys the key pair but then can't destroy the security group. After the destroy fails the key pair is gone, but the security group and 3 instances that were previously brought up are still there.
The text was updated successfully, but these errors were encountered: