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
null: a value that represents absence or omission. If you set an argument of a resource or module to null, Terraform behaves as though you had completely omitted it — it will use the argument's default value if it has one, or raise an error if the argument is mandatory. null is most useful in conditional expressions, so you can dynamically omit an argument if a condition isn't met.
Actual Behavior
my_var in the resource definition is not ignored as if it was ommited, but passed as an acutal null value, which in this example breaks string interpolation.
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.
ghost
locked as resolved and limited conversation to collaborators
Mar 13, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
https://github.com/stigok/terraform-use-default-value-when-null
Debug Output
https://raw.githubusercontent.com/stigok/terraform-use-default-value-when-null/main/tfdebug.log
Crash Output
Expected Behavior
The
modules/test
module should use the module's default value formy_var
when it is passed anull
value, as stated in the Terraform syntax documentation:Actual Behavior
my_var
in the resource definition is not ignored as if it was ommited, but passed as an acutalnull
value, which in this example breaks string interpolation.Steps to Reproduce
terraform init
terraform plan
Additional Context
Linux 64bit
References
Somewhat related to #5471
The text was updated successfully, but these errors were encountered: