Fix schema validation false positives and add engine-conditional rules#4480
Open
kddejong wants to merge 3 commits intoaws-cloudformation:mainfrom
Open
Fix schema validation false positives and add engine-conditional rules#4480kddejong wants to merge 3 commits intoaws-cloudformation:mainfrom
kddejong wants to merge 3 commits intoaws-cloudformation:mainfrom
Conversation
Schema fixes: - Add maxUniqueItems JSON Schema keyword for arrays where duplicates are allowed but the unique count is limited (e.g. CloudWatch Alarm actions) - Replace maxItems with maxUniqueItems for CloudWatch Alarm AlarmActions, OKActions, and InsufficientDataActions - Set uniqueItems to true for Lambda Function Layers - Remove maxItems from Connect RoutingProfile QueueConfigs (API batch limit, not resource limit) - Remove stale enums from EC2 EIP Domain, VPNGateway Type, and CustomerGateway Type - Remove stale enum from SES ConfigurationSetEventDestination DimensionValueSource and add manual patch with both camelCase and SCREAMING_SNAKE_CASE values - Remove stale pattern from SecurityHub AutomationRule MapFilter Value - Fix smithy script to clean up stale files when no patches remain New rules: - E3720: Validate StorageEncrypted is required when KmsKeyId is specified for non-custom engine RDS DBInstances - E3721: Validate ReplicaMode enum values for Oracle and Db2 engines - W3699: Warn when ReplicaMode is specified for non-Oracle/Db2 engines (dead config, silently ignored) - W3700: Warn when EIP Domain has non-standard values (silently converted to vpc) Smithy automation: - Add exceptions for properties where smithy enums are too restrictive or incorrect for CloudFormation - Clean up stale smithy.json files that only contained redundant patches
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4480 +/- ##
==========================================
+ Coverage 93.44% 93.47% +0.03%
==========================================
Files 455 459 +4
Lines 14943 15022 +79
Branches 2898 2906 +8
==========================================
+ Hits 13963 14042 +79
Misses 601 601
Partials 379 379
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix several schema validation false positives and add new engine-conditional rules for RDS DBInstance properties.
Schema fixes
maxUniqueItemsJSON Schema keyword for arrays where duplicates are allowed but the unique count is limited (e.g. CloudWatch Alarm actions)maxItemswithmaxUniqueItemsfor CloudWatch AlarmAlarmActions,OKActions, andInsufficientDataActionsuniqueItemstotruefor Lambda Function LayersmaxItemsfrom Connect RoutingProfileQueueConfigs(API batch limit, not resource limit)Domain, VPNGatewayType, and CustomerGatewayTypeDimensionValueSourceand add manual patch with both camelCase and SCREAMING_SNAKE_CASE valuesMapFilter/ValueNew rules
StorageEncryptedis required whenKmsKeyIdis specified for non-custom engine RDS DBInstancesReplicaModeenum values for Oracle and Db2 enginesReplicaModeis specified for non-Oracle/Db2 engines (dead config, silently ignored)Domainhas non-standard values (silently converted tovpc)Smithy automation
smithy.jsonfiles that only contained redundant patchesTesting
maxUniqueItemskeyword