-
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
can
function does not work properly with nonsensitive
function
#31646
Comments
Thanks for sharing this, @KyleKotowick. I don't have a ready explanation for what's going on here, but for the benefit of someone investigating this (assuming it isn't me!) I'll note that So, for an expression like
Without actually digging into the code, I have a hunch that what's going on here is that the special evaluation behavior for The |
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. |
Terraform Version
Terraform Configuration Files
A:
B:
Expected Behavior
Both outputs should have the same result, since they're both operating on a
uuid()
value.Actual Behavior
A:
B:
Since the function throws an error when you actually try to use it, the
can()
in A should returnfalse
.Steps to Reproduce
terraform apply
Additional Comments
There's some other funny behaviour going on as well. Compare these two outputs:
Do a
terraform plan
:Why is one value known at plan-time, while the other is not?
Now do a
terraform apply
:The two outputs have different values, which they almost certainly should not.
Overall, some really funky behaviour going on. @apparentlymart another good one for you :)
The text was updated successfully, but these errors were encountered: