-
Notifications
You must be signed in to change notification settings - Fork 4.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
Deleting route tables or security groups fails when still associated with a subnet #114
Comments
@mbfrahry Using the updated azurerm_route_table (where route is now computed) this does still fail initially saying that nsg can't be deleted because subnet depends on it. but wait a few seconds and tf apply again and all's well. is it possible we're not waiting for the right signal that the nsg and subnet are disassociated before doing the delete of the nsg? |
Unfortunately, this is an issue with how Terraform keeps track of associations between resources. We are actively discussing solutions to this issue and will provide updates as they come. A workaround would be to first comment out the network_security_group_id and route_table_id from the subnet, run terraform apply, and then remove the route table and network security group. We understand that this is not ideal and will hopefully have a solution shortly. |
hey @cchildress Given this is a bug in Terraform Core - rather than keep this open in the wrong repository, I'm going to close this in favour of a bug tracking this in the Core repository: hashicorp/terraform#8617 - please subscribe to this issue for more information Thanks! |
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. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Terraform Version
0.9.6 and 0.10.0-beta1 (from git master)
Affected Resource(s)
Terraform Configuration Files
From this:
To this:
Debug Output
Gist
Expected Behavior
Terraform should remove the association with the subnet and then delete the resource.
Actual Behavior
The apply run fails because the resources cannot be deleted while still associated with a subnet.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
The text was updated successfully, but these errors were encountered: