cfn-lint icon indicating copy to clipboard operation
cfn-lint copied to clipboard

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

Open daisuke-awaji opened this issue 6 years ago • 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

daisuke-awaji avatar Jul 28 '18 15:07 daisuke-awaji

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

martysweet avatar Aug 01 '18 10:08 martysweet

this is fixed in the latest cfn spec i think

akdor1154 avatar Oct 22 '18 04:10 akdor1154