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

Terraform dependency management not advanced enough to catch some cases #9764

Closed
gtmtech opened this issue Nov 1, 2016 · 2 comments
Closed

Comments

@gtmtech
Copy link

gtmtech commented Nov 1, 2016

I first discovered this on #2376 on terraform 0.7.5.

To reproduce, take 2 aws_subnet resources with CIDR blocks, A= 10.1.1.0/24 and B= 10.1.2.0/24. Spin them up.

Now - oops, I got them the wrong way around, and A should have been 10.1.2.0/24 and B should have been 10.1.1.0/24 - so I reset them and terraform apply.

Terraform is unable to resolve this situation. What it should do is identify that the resources conflict, and it needs to destroy BOTH before recreating BOTH.

If other resources are based off of these resources, e.g. security group rules, then terraform will report other errors such as #2376 . and the whole thing cascades down.

It would be possible for terraform to successfully detect and resolve these problems, but currently its dependency management tree is not sophisticated enough to handle it.

@mitchellh
Copy link
Contributor

There are other issues discussing smarter destroy logic, and there is a lot of discussion/thought around those. It is a complicated issue and I'll delegate to those. Sorry no specific issue number but the title it usually around destroy ordering, I remember being involved in those convos and its something we definitely want to think about.

@ghost
Copy link

ghost commented Apr 20, 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 Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants