-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_subnet destroy times out #15230
Comments
After a bit more digging, I found that it's the elasticsearch domain that has an ENI in the subnet being destroy. That's getting in the way of the destroy. If you notice in my original post, there's a change being done to the elasticsearch domain. Here's more details on it:
So, TF should first make the subnet change on the ES before trying to destroy the subnet. To do that, it needs to create the two new subnets (because I'm moving the ES domain to them). However, that's not possible, because one of the two new subnets has the same CIDR block as the old subnet. So there's somewhat of a circular issue here. |
My way around this was to change the CIDR blocks of the new subnets. Run apply with -target for the two new subnets (so they get created). Then, destroying the subnet still took 9 minutes:
Why? Because Elasticsearch was stuck trying to move the domain between subnets. The way to get it out of that state was to upgrade the domain to the most recent version. (the update process forced Elasticsearch to detach the network interface from the old subnet... freeing it to be deleted) Ah what a day :) |
Hi @random930. Unfortunately, Terraform doesn't support those types of dependencies between resources. There is some thought being put into how Terraform could handle this. For example hashicorp/terraform#16065, hashicorp/terraform#8099. Since this applies to the Terraform tool as a whole, I'm going to close this ticket. Their repository can be found at https://github.com/hashicorp/terraform |
What about the ability to get the actual error message, instead of waiting
for a timeout? (the original post in this ticket)
…On Mon, Sep 21, 2020 at 2:49 PM Graham Davison ***@***.***> wrote:
Hi @random930 <https://github.com/random930>. Unfortunately, Terraform
doesn't support those types of dependencies between resources. There is
some thought being put into how Terraform could handle this. For example
hashicorp/terraform#16065
<hashicorp/terraform#16065>,
hashicorp/terraform#8099
<hashicorp/terraform#8099>.
Since this applies to the Terraform tool as a whole, I'm going to close
this ticket. Their repository can be found at
https://github.com/hashicorp/terraform
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15230 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOL3ATJWB643AI3Y6QKP77DSG7C6DANCNFSM4RSUIJ2Q>
.
|
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v0.13.2
Affected Resource(s)
Terraform Configuration Files
I'm including the plan here instead of the HCL. The issue is during DESTROY and not creation of resources.
Debug Output
The relevant part shows that TF is ignoring the error returned from AWS:
Expected Behavior
Either Terraform should show me the error. Or, better yet, determine what is the dependency and help me destroy it.
Actual Behavior
Times out after 20 minutes.
The text was updated successfully, but these errors were encountered: