-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
enabled = 'false' causes "Resource 'null_resource.default' not found for variable 'null_resource.default.triggers.x'' #14
Comments
@lestephane thank you for testing the module and reporting the issue. They made it a fatal error in But then switched it to warning in
To enable that behavior, you need to set the variable They mentioned they will make it an error again in But if they fix ternaries (to short-circuit and not evaluate left and right part at the same time), we can work around the issue very easily Since you mentioned you are using Terraform Thank you |
Thanks for the detailed explanation. Terraform has rough edges around
conditionals, not just ternary operator, but also conditional modules
(module counts) are not supported. I'll stay away from using conditionals
for now.
…On Thu, Dec 7, 2017 at 6:54 PM, Andriy Knysh ***@***.***> wrote:
@lestephane <https://github.com/lestephane> thank you for testing the
module and reporting the issue.
It's a known issue in the new versions of Terraform.
They made it a fatal error in 0.11.0 to reference a resource with count=0
even if that recource is not used.
hashicorp/terraform#16726
<hashicorp/terraform#16726>
But then switched it to warning in 0.11.1
https://github.com/hashicorp/terraform/blob/v0.11.1/CHANGELOG.md
Since the new feature was already rolled out, and since development for
0.12 depends on the foundational changes that enabled it, we decided to
compromise with an opt-out mechanism in 0.11.1, so those with
configurations containing problematic output expressions have a means to
use 0.11.1 without first fixing all modules. We understand that this is not
the most ideal migration path -- if we could do this over again we would've
introduced the warning in one of the 0.10 point releases -- but we hope
that this compromise is acceptable so that we can continue to make progress
towards 0.12.
To enable that behavior, you need to set the variable
TF_WARN_OUTPUT_ERRORS=1
They mentioned they will make it an error again in 0.12, so it's a
temporalily fix anyway.
But if they fix ternaries (to short-circuit and not evaluate left and
right part at the same time), we can work around the issue very easily
hashicorp/hil#50 <hashicorp/hil#50>
Since you mentioned you are using Terraform 0.11.1, could you please try
to set TF_WARN_OUTPUT_ERRORS=1 and test again?
Thank you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFNTlMTA0fussoZGWHyC36hxM8uGALh9ks5s-CZggaJpZM4Q5xx4>
.
|
@lestephane let us know if you have any other questions or concerns, we'll try to address them |
When i use enabled = "false":
I get errors because the module outputs refer to a resource that is not present when enabled is false:
terragrunt -version
terragrunt version v0.13.23
terraform -version
Terraform v0.11.1
The text was updated successfully, but these errors were encountered: