Skip to content

Add new SSM parameter value types for EC2 and Lambda#4359

Open
kpushkin-ias wants to merge 1 commit intoaws-cloudformation:mainfrom
kpushkin-ias:main
Open

Add new SSM parameter value types for EC2 and Lambda#4359
kpushkin-ias wants to merge 1 commit intoaws-cloudformation:mainfrom
kpushkin-ias:main

Conversation

@kpushkin-ias
Copy link

Issue #, if available:

Description of changes:

This pull request adds support for new AWS SSM parameter value types in src/cfnlint/helpers.py. These enhancements improve the tool’s ability to validate CloudFormation templates that utilize these parameter types. Practical CFN deployments have demonstrated that these types work as expected and should be validated successfully by cfn-lint.

Support for additional AWS SSM parameter value types:

  • Added AWS::SSM::Parameter::Value<AWS::EC2::PrefixList::Id> to the list of recognized parameter types.
  • Added AWS::SSM::Parameter::Value<AWS::EC2::SecurityGroup> to the list of recognized parameter types.
  • Added AWS::SSM::Parameter::Value<AWS::Lambda::Function::Arn> to the list of recognized parameter types.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.53%. Comparing base (0bbabc9) to head (5bb181b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4359      +/-   ##
==========================================
- Coverage   93.54%   93.53%   -0.01%     
==========================================
  Files         418      418              
  Lines       14145    14145              
  Branches     2817     2817              
==========================================
- Hits        13232    13231       -1     
  Misses        567      567              
- Partials      346      347       +1     
Flag Coverage Δ
unittests 93.52% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

kddejong added a commit to kddejong/cfn-python-lint that referenced this pull request Feb 5, 2026
… 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.
kddejong added a commit to kddejong/cfn-python-lint that referenced this pull request Feb 5, 2026
… 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.
kddejong added a commit to kddejong/cfn-python-lint that referenced this pull request Feb 5, 2026
… 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.
kddejong added a commit to kddejong/cfn-python-lint that referenced this pull request Feb 5, 2026
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants