Accept any SSM parameter and List types with warning for undocumented types#4361
Merged
kddejong merged 2 commits intoaws-cloudformation:mainfrom Feb 23, 2026
Merged
Conversation
643d0b5 to
451a763
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4361 +/- ##
=======================================
Coverage 93.54% 93.55%
=======================================
Files 418 421 +3
Lines 14145 14206 +61
Branches 2817 2823 +6
=======================================
+ Hits 13232 13290 +58
- Misses 567 568 +1
- Partials 346 348 +2
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:
|
84bdf03 to
86ee527
Compare
… types CloudFormation accepts any AWS::SSM::Parameter::Value<*> and List<*> pattern but only validates specific documented types. Changed validation to accept all patterns instead of maintaining a hardcoded enum list. Added W2002 warning rule to alert users when using parameter types that aren't officially documented by CloudFormation, as these won't be validated by CloudFormation. Changes: - Modified parameter type schema to use anyOf with patterns - Created W2002 CfnLintKeyword rule for unsupported type warnings - Added comprehensive tests for new behavior Fixes the need for PR aws-cloudformation#4359 and future similar requests.
Moved Type validation from JSON schema to CfnLintKeyword rule to provide a clean, readable error message instead of verbose anyOf schema failures. The rule accepts documented types from VALID_PARAMETER_TYPES and also accepts any AWS::SSM::Parameter::Value<*> or List<*> pattern (which triggers W2002 warning for undocumented types). Changes: - Converted Types rule to CfnLintKeyword with custom validation - Simplified schema to only check Type is a string - Added comprehensive tests for E2002 rule - Error message now shows sorted list of valid types
8fea876 to
f063ad2
Compare
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.
CloudFormation accepts any AWS::SSM::Parameter::Value<> and List<> pattern but only validates specific documented types. Changed validation to accept all patterns instead of maintaining a hardcoded enum list.
Added W2002 warning rule to alert users when using parameter types that aren't officially documented by CloudFormation, as these won't be validated by CloudFormation.
Changes:
Fixes the need for PR #4359 and future similar requests.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.