Skip to content
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

provider/aws: Fix dependency violation with subnets and security groups #1252

Merged
merged 1 commit into from
Mar 19, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Mar 19, 2015

Though not directly connected, trying to delete a subnet and security group in
parallel can cause a dependency violation from the subnet, claiming there are
dependencies.

This commit fixes that by allowing subnet deletion to tolerate failure code of DependencyViolation, usingwait.WaitForState

The destroy graph remains the same:

out

Fixes #934 (which has an example config)

Though not directly connected, trying to delete a subnet and security group in
parallel can cause a dependency violation from the subnet, claiming there are
dependencies.

This commit fixes that by allowing subnet deletion to tolerate failure with a
retry / refresh function.

Fixes #934
@phinze
Copy link
Contributor

phinze commented Mar 19, 2015

Hey this is cool! LGTM

@phinze
Copy link
Contributor

phinze commented Mar 19, 2015

(Someday we'll let providers express these implicit dependencies, but 👍 for this strategy in the meantime.)

catsby added a commit that referenced this pull request Mar 19, 2015
…ation

provider/aws: Fix dependency violation with subnets and security groups
@catsby catsby merged commit 3cbc889 into master Mar 19, 2015
@catsby catsby deleted the fix-subnet-sg-dependency-violation branch March 19, 2015 20:40
@mitchellh
Copy link
Contributor

Yeah, this is a good stopgap.

@bitglue
Copy link

bitglue commented Apr 2, 2015

👎 #1368

Just spent half an hour figuring this out, between waiting for the timeout several times and reading through the code only to figure out what the previous error message would have told me: someone created an ELB in my subnet without Terraform's knowledge.

@ghost
Copy link

ghost commented May 3, 2020

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.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subnet chained to AWS ELB cannot be destroyed (DependencyViolation)
4 participants