You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var.testObj != null && var.testObj.name != null should end evaluation early in var.testObj != null since it's already false and no need to check the following operation.
Actual Behavior
all operation evaluated even it can be end early
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Attempt to get attribute from null value
│
│ on main.tf line 8, in output "name":
│ 8: value = var.testObj != null && var.testObj.name != null ? var.testObj.name : "empty"
│ ├────────────────
│ │ var.testObj is null
│
│ This value is null, so it does not have any attributes.
Steps to Reproduce
terraform init
terraform plan
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered:
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.
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/NewbMiao/b3a2677d3507b62f5f05be71d3a19560
Expected Behavior
var.testObj != null && var.testObj.name != null
should end evaluation early invar.testObj != null
since it's already false and no need to check the following operation.Actual Behavior
all operation evaluated even it can be end early
Steps to Reproduce
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: