generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 121
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
b/fix constant drift when nested required
attributes have no defaults
#2022
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ewbankkit
approved these changes
Sep 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
johnsonaj
added
bug
code-generation
Relates to the conversion of CloudFormation schema to Terraform schema at buildtime.
documentation
labels
Sep 18, 2024
johnsonaj
changed the title
b/fix constant drift when
b/fix constant drift when nested Sep 18, 2024
required
attributes have no defaultsrequired
attributes have no defaults
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
code-generation
Relates to the conversion of CloudFormation schema to Terraform schema at buildtime.
documentation
prioritized
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Community Note
Description
When a
required
attributed that is nested inside acomputed,optional
attribute does not have a default set it can cause a constant drift.This PR sets all nested
required
attributes to also becomputed,optional
. To maintain therequired
validation, a newNotNull
validator is added. This will set the attribute asrequired
when not configured, and the entire object is notcomputed
References
Closes #1216
Closes #1847
Closes #1819
Closes #1795
Closes #1852
Closes #1714
Closes #1854
Closes #1855
Testing
Before
After
Before
After