Unable to destroy VPC (TF 0.6.16) [The vpc has dependencies and cannot be deleted]

561 views
Skip to first unread message

Marco Pas

unread,
May 25, 2016, 3:32:24 AM5/25/16
to Terraform
Hi there, i am running into an issue where we are unable to perform a 'terraform destroy'. 

The result is that everything gets deleted except the vpc.

* aws_vpc.vpc: DependencyViolation: The vpc 'vpc-123456789' has dependencies and cannot be deleted.

This is running on Terraform 0.6.16

Any tip on what i am missing?

- Marco

Noah

unread,
May 25, 2016, 10:19:29 PM5/25/16
to Terraform
I occasionally run into this and typically I'll find an additional subnet or security groups are the issue.

The security groups typically are a result of someone adjusting the groups out of terraform (mostly me... lol). 

The subnets I haven't nailed down yet - it seems that a default subnet gets created. Suspect its probably when I have a failure at a certain point, but then fix the issue and re-apply. 

I've found the best way is to just go through the VPC items, look for anything that doesn't line up in regards to the names. Then of course take note of the scenario so you don't end up like me trying to remember what caused it a week later.
Reply all
Reply to author
Forward
0 new messages