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

Closed

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

@spencer-p
Copy link
Collaborator

@roberthbailey Is this PR still active? Can you resolve conflicts if so?

@roberthbailey
Copy link
Collaborator Author

I had forgotten about this PR. At this point I'm going to close it and I will re-open a new one if this bothers me again in the future.

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.

2 participants