Skip to content

RegEx pattern match for E1151 for VpcId doesn't allow {{resolve:ssm:/xxx}} #4166

@webbd-jabil

Description

@webbd-jabil

CloudFormation Lint Version

1.36.0

What operating system are you using?

Windows

Describe the bug

RegEx pattern match for E1151 for VpcId doesn't allow {{resolve:ssm:/xxx}}

I'm storing re-usable values in SSM parameters for use within CloudFormation templates. Using {{resolve:ssm:/...}} is a valid way to pull the VpcId value.

Expected behavior

Expression {{resolve:ssm:/xxx}} is allowed

Reproduction template

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  VPCEndpointEC2:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: 'Interface'
      PrivateDnsEnabled: true
      SubnetIds:
        - "{{resolve:ssm:/Core/Subnet1a}}"
        - "{{resolve:ssm:/Core/Subnet1b}}"
        - "{{resolve:ssm:/Core/Subnet1c}}"
      ServiceName: !Sub com.amazonaws.${AWS::Region}.ec2
      VpcId: "{{resolve:ssm:/Core/VpcID}}"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions