-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
local and output evaluation fails when referencing a destroy node #17425
Comments
I am seeing the exact same issue, not mention how hard was to catch this error. |
This was referenced Mar 18, 2018
antonbabenko
pushed a commit
to terraform-aws-modules/terraform-aws-iam
that referenced
this issue
May 2, 2018
This allows the advertised variables to function. The outputs had to be modified to work with conditionals in line with the workaround in hashicorp/terraform#17425.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The pattern users have used to create "optional" resources is to dynamically set a count value to 0. In order to prevent interpolation errors in outputs (and locals), the suggested pattern has been to use the list from the splat (
*
) operator, along with an additional element to ensure there is always a value for interpolation:This works when the resource remains present in the graph, but can fail when the count is later changed to 0.
Using the following config:
We can reproduce this with
The text was updated successfully, but these errors were encountered: