-
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
Cloudfront + Internet Gateway terraform destroy issue #6413
Comments
I have a guess that after trying to destroy the internet gateway after 5 minutes, terraform stops to do so and causes this issue. This might have some correlation with the obligatory 15minute cloudfront distribution destruction. |
Hey @danshao, just looking at the CloudFront stuff specifically, it looks like it deleted okay:
What might be happening is that you are not getting the error until all the destroy operations in progress finish (as TF runs several at once as you can see from the output). There have been issues where the IGW waiter has misbehaved before, see #3747 and #5120. I'm surprised though, because according to your output it almost looks like it quit after the 5 minute mark, and that waiter has been changed to run 30 attempts with a 15 minute max timeout. If this is reproducible, can you try a few things?
Doing this stuff should narrow down the issue and especially pinpoint if it's an issue with the CloudFront or the IGW waiter. |
I don't mind having to wait for the deletion of the While producing the logs that you requested, I noticed that running terraform with
Here are the logs for both cases. |
Hey there @danshao do you have a configuration file that demonstrates this? Speiciflaly, I'm interested in where you're using the Internet Gateway.... in the past we've addressed this by explicitly adding a If you could share part of your configuration that references the Internet Gateway or the CloudFront configuration, that would help. Please be sure to remove anything secret! |
I was able to resolve this issue by creating a On the otherhand, I've run into this problem before and I've double checked to make sure that I am using
Therefore, I would assume that there is a relationship of |
Thanks for following up. For
I realize what you shared is shorthand, so maybe you have that in there. I'm glad you were able to resolve this though, and I'm sorry for the trouble. The Internet Gateway limitation is documented and in this case there isn't a lot I can do here about it. Let me know if there's anything else I can do here |
Yes, I'm fully aware of the syntax. As you mentioned, I was writing it shorthand to save time. Again, although documentation is limited, I don't see why the |
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. |
Terraform Version
Affected Resource(s)
Output
https://gist.github.com/danshao/afbc1f901ec2fb580832d476ebd14a90
Expected Behavior
Internet Gateway should be destroyed after one run of
terraform destroy
.Actual Behavior
Internet Gateway requires
terraform destroy
to be run twice.The text was updated successfully, but these errors were encountered: