aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::AutoScaling::AutoScalingGroup - LaunchTemplateSpecification-Version - Add support for specifying $Latest and $Default
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
## 1. AWS::AutoScaling::AutoScalingGroup-LaunchTemplateSpecification-Version - Add support for specifying $Latest and $Default
The EC2 service allow one to create a Launch Template Specification with a `Version` that is either a version number or one of the keywords: `$Latest` or `$Default` ([docs](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html)).
However, currently CloudFormation does only support specifying numeric versions for an EC2 Launch Template Specification ([docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-version)).
This feature request is about allowing one to specify `$Latest` and `$Default` as well.
```
LaunchTemplateId: String
LaunchTemplateName: String
Version: String # <-- This attribute should also support: "$Latest" and "$Default"
```
## 2. Scope of request
From the [docs:](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-version)
> **Version**
The version number. AWS CloudFormation does not support specifying $Latest, or $Default for the template version number.
From trial and error, I can confirm that this is the current behavior.
This request is about resolving this limitation and allow specying `$Latest` and `$Default` for the `Version` attribute.
## 3. Expected behavior
Example use:
```
LaunchTemplateId:
Version: $Latest
```
```
LaunchTemplateId:
Version: $Default
```
## 4. Suggest specific test cases
Test the common use case by passing `$Latest` and `$Default` to the `Version` attribute.
Test drift detection by verifying that it supports the new attribute values.
## 5. Helpful Links to speed up research and evaluation
#### EC2 Auto Scaling API Reference (DataType: LaunchTemplateSpecification)
https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html
> **Version**
The version number, $Latest, or $Default. If the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.
#### CloudFormation LaunchTemplateSpecification docs:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-version
> **Version**
The version number. AWS CloudFormation does not support specifying $Latest, or $Default for the template version number.
## 6. Category (required)
Compute (EC2)
Compute (EC2 Auto Scaling Groups)
Compute (EC2 Launch Templates)
Contributor guide
Assessment
This issue has not been assessed yet.