-
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
destroy failing in AWS #1203
Comments
I manually removed the EC2 instances in the VPC, and the plan executed differently, but still failed:
|
This looks like the same issue as #276. That issue might be too old but there is definitely one open. This is due to the eventual consistency of amazon's API, the "destroy" was successful but Terraform is too fast and moves on before it actually processes it internally. We have to just do a poll on the GET until it 404s. (We've done this for some other resources, a sadness) |
@mitchellh I personally don't think it is, but you know better than me. In #276 it seems to be destroying the instances first, but here it tries to destroy the security groups - the AWS instances don't get destroyed at all during the output @catsby might be able to comment as I reckon this might be related to the porting to aws-sdk-go ? It definitely worked before on 0.3.7 with the same plan. |
The AWS API is not really being helpful in these cases as we don't know what dependencies is it waiting for, but it might be as well related to #497 (although it has a different error message). In case of VPC it can really be almost any resource which has IP address assigned from that VPC subnet and/or any subnet relationship - EC2, ELB, ASG, RDS, ... |
Hey @jaxxstorm do you have a minimal config that reproduces this? If you do, that would be really helpful. Be sure to strip any sensitive / secrets. There was similar issues in #1189 that was resolved in part by using |
Hi @catsby - I don't think I can provide the config because we use several self written modules to create our VPC config. The problem arises when using these modules. We have a module to create a NAT instance, then separate modules to create our routing tables and individual instances separately. I can probably provide it in private, but not publicly. I agree that using depends_on would fix this, but this doesn't yet work across modules so it's not an option here unfortunately. Should we reopen this bug, do you think? |
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. |
Looks like the latest build still having some issues with destroys:
it seems to me that the issue here lies around not deleting EC2 instances inside a security group or subnet BEFORE deleting those security groups. Perhaps there needs to be dependencies on that worked in?
The text was updated successfully, but these errors were encountered: