dms_s3_endpoint: fix enum validations #991
Merged
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.
The
aws_dms_s3_endpointmapping was accidentally removed during the Smithy migration in #901, causing validation rules for this resource to be deleted. This restores the mapping and adds an HCL function-based transform system to handle enum value differences between Smithy models and the Terraform provider to fix mismatched enum values. This problem predated Smithy and is a persistent difference between how the TF provider and the AWS API models represent this attribute.Changes
aws_dms_s3_endpointmapping indms.hclwith validation for 8 attributesEvalContextuppercase()andreplace()transform functions usable directly in mapping expressionscompression_type: "none"/"gzip" → "NONE"/"GZIP"encryption_mode: "sse-kms"/"sse-s3" → "SSE_KMS"/"SSE_S3"The transform system leverages HCL's built-in
EvalContextwith custom list-transform function wrappers around stdlib'sUpperFuncandReplaceFunc. This keeps transform logic declarative in mapping files rather than hardcoded in the generator, making it extensible for future cases where Smithy and Terraform formats differ.References
Closes #989