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 when deleting Internet Gateways #1325

Merged
merged 1 commit into from
Mar 27, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Mar 27, 2015

This PR re-works how we handle detaching an Internet Gateway. Currently, we issue the detach call and wait for the state to become detached. If there was a DependencyViolation involving an EIP or VPC, we never retry the detach call, and simply return an error.

This PR changes the behavior to issue the detach call in a refresh func, such that if there's an error we simply retry the call. This should resolve #1303, maybe others.

@phinze
Copy link
Contributor

phinze commented Mar 27, 2015

Niiice - LGTM 🐑

catsby added a commit that referenced this pull request Mar 27, 2015
…lation

provider/aws: Fix dependency violation when deleting Internet Gateways
@catsby catsby merged commit dd72df6 into master Mar 27, 2015
@catsby catsby deleted the b-fix-internetgateway-dep-violation branch March 27, 2015 17:01
catsby pushed a commit that referenced this pull request Jul 7, 2016
This workaround is originally from 71b30c6.
According to the commit message from Mitchell Hashimoto:

    So I think the AWS API is just broken here. In the case that the state
    doesn't update, just assume it did after 5 seconds.

Based on my experience, this AWS API is still broken in the same way.

The timeout was later increased from 5 seconds to 10 seconds in
265cc4f.

The timeout (but not the timer) was removed inexplicably in GH-1325.

The symptom is this error from `terraform apply`:

    aws_internet_gateway.test: Error waiting for internet gateway (igw-553b4731) to attach: timeout while waiting for state to become '[available]'

followed by all subsequent `terraform apply` commands failing with this error:

    aws_internet_gateway.test: Resource.AlreadyAssociated: resource igw-553b4731 is already attached to network vpc-61bc7606
@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.

aws vpc destroy fails with unmap public addresses before detaching gateway
3 participants