-
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
Cannot destroy due to cycles when using create_before_destroy #2493
Comments
#2438 also makes a reference to this issue, but the code in this ticket is a much smaller example yielding the same problem. All you need to do to duplicate this issue is run: |
FWIW - The only workaround I have found is literally to:
Clearly, the |
Hey @joekhoobyar – sorry for the silence here. Unfortunately, at this time you cannot use the For example, in configuration you shared resource In order for your example configuration to successfully destroy with no cycles, the same
This is a known limitation that isn't currently documented, so I opened #2944 in attempt to document it better. Sorry again for the trouble and the silence, I hope this clears things up! |
#2944 documenting this issue was merged, so I'm going to close this issue now. Please let me know if you have further questions. Thanks! |
I just found this after reporting a duplicate issue myself (#3294). This introduces a significant limitation for us:
|
IMHO this issue deserves a 'real' solution; however, I've had success using the
|
Thanks @roboll for the workaround... and I completely agree w/ your assessment....
Further, cascading 'create_before_destroy' still does not solve the issue. When applying the lifecycle rule to all resources, the ASG is deleted (in addition to the launch configuration) on updates. This results in the instances being prematurely terminated which is not viable. I'd like to share some background in the hopes that it might help. We've been in an on-going debate about which tool to use for infrastructure automation. I'm a huge advocate of terraform and the Hashicorp suite, but as with most things like this, each person that get's added to the conversation has a different opinion. There's no 'silver bullet' solution, but this issue in particular has hurt my ability to build confidence in terraform as 'the right choice'. I hope this is not taken the wrong way, but what makes it most difficult is that despite many tickets related to this issue, there seems to be no 'traction' in it being addressed. |
This issue should not have been closed. The problem described in this issue is not addressed in any of the other 28 open issues related to create_before_destroy and still present. Destruction of a deployed stack should not require us to taint all the modules or replacing all occurences of "create_before_destroy = true" with "create_before_destroy = false" |
This issue is a massive inconvenience that continues to haunt our infrastructure. It usually results in us forcefully and very manually disassembling everything and then starting from scratch. |
Is there an issue that I can track for a real solution here? I'll admit that I haven't looked into this issue in any great detail, but it seems like this could be fixed by having Terraform automatically apply |
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. |
This should not produce cycles - and it makes the workaround for #2421 unusable for the
terraform destroy
case.In other words, we can create infrastructure, but we cannot destroy it!
Here are the files involved, and example output:
https://gist.github.com/joekhoobyar/5421b3ebbf9c313404ec
The text was updated successfully, but these errors were encountered: