Skip to content
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

Simplify how default values are set for complex variables types. #728

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roberthbailey
Copy link
Collaborator

As documented in https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes

"Terraform applies the default value you specify in the optional modifier first and then later applies any nested default values to that attribute"

which means that the values specified in "optional" constraints was always overridden immediately by the defaults specified below.

This change simplifies how the defaults are set, solely using the optional defaults.

As documented in https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes

"Terraform applies the default value you specify in the optional
modifier first and then later applies any nested default values to that
attribute"

which means that the values specified in "optional" constraints was
**always** overridden immediately by the defaults specified below.

This change simplifies how the defaults are set, solely using the
optional defaults.
@roberthbailey
Copy link
Collaborator Author

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant