diff --git a/src/cfnlint/template/transforms/_sam.py b/src/cfnlint/template/transforms/_sam.py index 4bb8b4a960..5580e82dbc 100644 --- a/src/cfnlint/template/transforms/_sam.py +++ b/src/cfnlint/template/transforms/_sam.py @@ -151,6 +151,10 @@ def _replace_variables_with_language_extension(self): if "AWS::LanguageExtensions" in transforms: parameters = {} for k, v in self._template.get("Parameters", {}).items(): + p_type = v.get("Type") + if isinstance(p_type, str): + if p_type.startswith("AWS::SSM::Parameter::"): + continue if isinstance(v, dict) and v.get("Default"): parameters[k] = v.get("Default") diff --git a/test/fixtures/templates/good/transform/language_extension.yaml b/test/fixtures/templates/good/transform/language_extension.yaml index 9f6a401a87..f6f19e704d 100644 --- a/test/fixtures/templates/good/transform/language_extension.yaml +++ b/test/fixtures/templates/good/transform/language_extension.yaml @@ -10,6 +10,9 @@ Parameters: AutoPublishAliasParameter: Type: String Default: TestAliasRef + VpcId: + Type: "AWS::SSM::Parameter::Value" + Default: "/network/vpc/primary/id" Mappings: StackIdMap01: teststack1: @@ -63,3 +66,9 @@ Resources: def handler(event, context): print("Hello, world!") AutoPublishAlias: !Ref AutoPublishAliasParameter + + SecurityGroups: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Example security group + VpcId: !Ref VpcId