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

aws vpc destroy fails with unmap public addresses before detaching gateway #1303

Closed
franklinwise opened this issue Mar 25, 2015 · 7 comments · Fixed by #1325
Closed

aws vpc destroy fails with unmap public addresses before detaching gateway #1303

franklinwise opened this issue Mar 25, 2015 · 7 comments · Fixed by #1325

Comments

@franklinwise
Copy link

upon attempting to destroy an aws vpc setup I get the following error:

Network vpc-d440fdb1 has some mapped public address(es). Please unmap those public address(es) before detaching the gateway.

Seems like destroying should just work. Perhaps unmapping public addresses needs to happen at the beginning of destroy?

Terraform v0.4.0-dev (28ecdac)

@kendawg2
Copy link

@franklinwise if you look at #1189 you will see some discussion about this. I was having a similar issue, and what I did was add a depends_on = ["aws_internet_gateway.gw"] to the instance that was getting an elastic IP and the problem went away. (of course .gw will be whatever you called it).

@kendawg2
Copy link

@mitchellh perhaps an implied dependency of the internet gateway for anything getting a public IP/Elastic IP might be in order. For me, the only time this happens is when I use an Elastic IP. All other instances that get a public IP have no issues. Also, if I run a destroy a second time, it finished the destroy properly.

@catsby
Copy link
Contributor

catsby commented Mar 27, 2015

Hey @kendawg2 , thanks for reporting this. Do you have an example config I can use? Please omit any secrets.

@catsby
Copy link
Contributor

catsby commented Mar 27, 2015

Reproduced with the config example here in 1189.

I'm seeing if I can add error handling to Internet Gateway as a bandaid, but the current solution is the explicit depends_on as mentioned.

@catsby
Copy link
Contributor

catsby commented Mar 27, 2015

I merged a fix for this in #1325

@franklinwise
Copy link
Author

Awesome! Thanks @mitchellh & @catsby

@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 a pull request may close this issue.

4 participants