-
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 fail #8229
Comments
Having the same issue with |
on another run that failed this way I was able to just remove the tfstate file as to consider the destroy done, as it looked like it did not have any of the resources around anymore anyways (seen through the AWS Console) |
We're also seeing this issue (on 0.7.1) when we destroy something that's already been destroyed on anything with a dependency. Looking at it it looks like the plan is attempting to build the dependency chain and pull in the data for the dependent resource but it's coming back as |
This is blocking us from destroying our stacks, so it's kind of a big deal. Has anyone come up with a workaround? |
This seems related to #7993 |
I'm getting this issue with Terraform 0.7.2. First, when trying to create a VPC with lots of subnets, routes, gateways, etc, I hit some sort of eventual consistency bug as reported in #8530:
Then, when I try to do
I'm now stuck, unable to create my infrastructure fully or destroy the partially created stuff that's sitting in my AWS account. |
I'm going to close this as a dup of #7993. I'm trying to reproduce this now... |
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. |
Version: 0.7
The only way I was able to get it to finish was to get from the terraform.tfstate.backup the relevant "aws_security_group.consul_servers" resource hash (with the ID, description and tags mentioned there, but not with any of the underlying dependencies - i.e. the SG rules) and put it in the correct position (same one/corresponding one) in the hash inside terraform.tfstate file. Running terraform destroy afterwards got it to finish completely and successfully.
I noticed that the same kind of behaviour happens if I issue terraform destroy after the resources were removed. A subsequent run gave me an output like
Now it is funny that it failed for only 411 resources, as I have a total of 1004 resources in this run - this indicating that it might be the case that it fails for only aws_security_group and aws_security_group_rule resources (I don't know the exact number I have, but I know it's somewhere over 300-ish in total, i.e. groups + rules).
This should be fixed, I should be able to destroy everything forcefully if needed, not have to do crazy voodoo with the state file.
On a related note, can someone please answer my comment here: #3019 (comment) ? We are seeing the same problem with Terraform v0.7 - even if we do a terraform run from scratch (no previous state existing in state file or the state file at all), e.g. error:
The text was updated successfully, but these errors were encountered: