Dynamic GroupName in Cloudformation

Viewed 23

I want to add Stack Names to Security Group Names created with Cloudformation. I mean I would like to add randomize name to the GroupName.

Example:

  ELBSecurityGroup:
      Type: AWS::EC2::SecurityGroup
      Properties:
        GroupName: ${AWS::StackName} SG
        VpcId: !Ref VpcId
2 Answers

Just delete GroupName: ${AWS::StackName} SG then your SG group will create with your stack name.

Related