-
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
Destroy cycle error with module outputs/inputs #1835
Comments
Thanks for the detailed report - we'll get this looked at. |
Fantastic bug report, I have it reproduced in a unit test case and I have a fix in mind. But first I'm going to eat dinner. Suspense |
I thought I had a fix but this is turning out to be more complicated than I imagined, see #1842 for more details on why this is complicated. I have to think about this more. |
So #1855 didn't fix my original problem cycle in our own code, but it did fix the example I gave. Digging into it more, it seems our cycle was caused by a provisioner not being defined in the root module. We have some "special" provisioners that use variables from created resources. Once we moved all the provisioners we could to the root, the cycle on destroy ceased to exist. Thanks for all your hard work on this @mitchellh |
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. |
Hey all, I was testing out some of the newest hotness with the module flatten of #1781 from #1582 against our stack and ran into another little snag with destroy.
This is on terraform master
I've been able to make it a small example. It happens when a resource's attribute is an attribute and is fed into another module as an input which is used.
Given:
main.tf
a_module/main.tf
b_module/main.tf
A terraform plan and apply works fine.
However, when planning the destroy, it fails with a cycle of which I'm not sure why.
Any ideas? Thanks again guys.
The text was updated successfully, but these errors were encountered: