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
Force all Optional
attributes to Computed
#667
Merged
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
added
runtime-handling
Relates to runtime handling and conversion of Terraform configuration to CloudFormation.
schema-handling
Relates to retrieval and handling of CloudFormation schema at buildtime.
code-generation
Relates to the conversion of CloudFormation schema to Terraform schema at buildtime.
and removed
runtime-handling
Relates to runtime handling and conversion of Terraform configuration to CloudFormation.
labels
Sep 12, 2022
… for accessanalyzer.
… for apigatewayv2.
… for appintegrations.
… for applicationinsights.
… for auditmanager.
… for autoscaling.
… for billingconductor.
… for certificatemanager.
… for cloudformation.
… for servicecatalog.
… for servicecatalogappregistry.
… for ssmcontacts.
… for ssmincidents.
… for stepfunctions.
ewbankkit
force-pushed
the
f-force-OptionalComputed
branch
from
September 12, 2022 18:53
1362990
to
6e8b295
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
code-generation
Relates to the conversion of CloudFormation schema to Terraform schema at buildtime.
schema-handling
Relates to retrieval and handling of CloudFormation schema at buildtime.
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
Closes #191.
Closes #301.
Closes #185.
Closes #220.
Closes #401.
Closes #389.
Closes #362.
This PR addresses the unexpected drift detection reported by Terraform when attributes marked as Optional and with no default value in a resource's CloudFormation schema are not configured by a practitioner but the underlying AWS service applies a default value.
These perpetual diffs are result of a fundamental difference in the way that CloudFormation (and hence the CloudControl API) and Terraform handle unconfigured optional attributes; CloudFormation effectively ignores the attribute but Terraform wants the attribute to have an empty,
null
value.To prevent the perpetual diffs we must mark the attributes as Computed when we generate the resource's Terraform schema, indicating that if no value has been configured then Terraform will not perform drift detection on the attribute.