-
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
error when destroying a vpc #1628
Comments
What are the addresses still in the VPC? Do they relate to something else in your Terraform configuration? Terraform can only delete things in the VPC first if in knows about them, otherwise it might inadvertently delete something it did not create, which is probably undesirable. There are also some bugs (#922, #1582) related to modules and dependencies. |
Sorry but I don't have the VPC sitting around anymore. I know there were some elastic IPs in there, but there were some other mappings too. |
@ryanking Sorry you hit this - I've been in the same situation and it's super frustrating to have to go and clean up everything manually. I think we might be able to file this under one of the existing bugs to keep things consolidated. Was the VPC defined in a module? Tagged in the meantime. |
It was not defined in a module. |
I run into this pretty much every time I do a destroy with my current setup. |
Can anyone contribute a configuration that reproduces this and omits any secrets? |
I just had this happen and it occurs maybe 1 out of 4 destructions, but I haven't been able to determine the cause. I have my VPC provisioned in a module and when this does occur Terraform freezes up on a EIP destruction. So-far I've been lucky that all the resources were destroyed aside from a stray launch config that seems to linger around. I'll see if I can replicate this consistently and send my config (it's pretty large so is there something specific you need?) |
Actually just noticed it happened again while I was typing this but froze up in a different place (aws_vpc.main-vpc: Destruction complete) and left two launch configs behind. |
@catsby I will isolate a configuration later today. |
@saulshanabrook thanks! It's likely a eventual consistency thing with AWS waiting on this or that to shut down in order to destroy. Something else gets a head of itself in deleting and errors out. We can either instruct people to use |
provider/aws: vpc delete retry on dependency violation [GH-1628]
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 consistently get this error when trying to destroy a VPC:
When that happens I'm left in a state where I basically have to go through and delete everything by hand.
I know destroying a VPC is probably rare, but its useful during the initial setup (create vpc, add some things, destroy, add some more things, apply, etc.).
The text was updated successfully, but these errors were encountered: