martysweet/cfn-lint

LaunchTemplate is not a valid property of AWS::AutoScaling::AutoScalingGroup

daisuke-awaji opened this issue · 2 comments

Although LaunchTemplate is specified as a parameter of AutoScalingGroup, it will not be recognized by cfn-lint and an error will result.
The execution log is as follows.

$ cfn-lint validate template.yaml
0 infos
0 warn
1 crit
Resource: Resources > Ec2InstanceAutoScalingGroup > Properties > LaunchTemplate
Message: LaunchTemplate is not a valid property of AWS::AutoScaling::AutoScalingGroup
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

Template invalid!

The template file is as follows

AutoScalingGroup:
  Type: AWS::AutoScaling::AutoScalingGroup
  Properties:
    VPCZoneIdentifier:
    - !Ref PublicSubnet1
    - !Ref PublicSubnet2
    LaunchTemplate:
      LaunchTemplateId: !Ref 'Ec2InstanceLaunchTemplate'
      Version: !GetAtt 'Ec2InstanceLaunchTemplate.LatestVersionNumber'
    MinSize: 1
    MaxSize: 1
    DesiredCapacity: 1

I would expect to see the following in the AWS CloudFormation specification: AWS::AutoScaling::AutoScalingGroup.LaunchTemplate

https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json

Will give the cfn guys a poke and see if this is a known issue

this is fixed in the latest cfn spec i think