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
Terraform does not throw a "key does not exist error" unless the key is actually going to be used, especially when the wrapping conditional checks for the existence of the key.
Actual Behavior
An error is thrown:
* module.mod.local.: local.local_variable: key "some_key" does not exist in map var.constants in:
${ contains( keys(var.constants), "some_key" ) == "true" ? var.constants["some_key"] : "other_default_value" }
Steps to Reproduce
Create a conditional local variable like above, which checks the map for a key before using the key, and run terraform.
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.
ghost
locked and limited conversation to collaborators
Apr 3, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Expected Behavior
Terraform does not throw a "key does not exist error" unless the key is actually going to be used, especially when the wrapping conditional checks for the existence of the key.
Actual Behavior
An error is thrown:
Steps to Reproduce
Create a conditional local variable like above, which checks the map for a key before using the key, and run terraform.
The text was updated successfully, but these errors were encountered: