aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

(AWS::EC2::LaunchTemplate ) - allow to set any VersionNumber as Default of an LaunchTemplate using CFN

Open
#1,518 1 comment 15 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::EC2::LaunchTemplate

### Resource name

_No response_

### Description

#### summary/impact
For debugging reasons, sometimes people check details of the currently "Configuration-In-Use" of an LaunchTemplate via AWS Console. If you click on a existing Launch template via Console you will always get the details of the Default Version - which is "hard-coded" always Version 1. Details below:

To begin with I tested the scenario by creating a Launch Template via CFN in eu-central-1 region. The launch template with version 1 (default) was created successfully along with the description as specified in the stack template. I then updated the stack which resulted in creation of a new version 2, but the default was still set to 1 and the new version 2 did not have any description.
Thus, I can conclude that the default version of a launch template cannot be specified in AWS CloudFormation. The same is given in [CloudFormation Documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2-launchtemplate-return-values-fn--getatt). Regarding the description issue, I've added #1517

#### is-state
> The default version of a launch template cannot be specified in AWS CloudFormation.

(Hence, it's always 1)
![LT_Version1](https://user-images.githubusercontent.com/16392819/218169165-cc4c6bd2-b20b-43ff-9259-f56fcb8e74a8.PNG)

#### target state
We are able to flag a version as default using CDK/CFN.

### Other Details

The AWS CLI command "modify-launch-template" supports setting the default version, hence CloudFormation could do so as well.

Contributor guide

Open the contributing guide

Research direction

Start with the AWS::EC2::LaunchTemplate CloudFormation resource documentation and the issue's reference to the AWS CLI modify-launch-template command. The work is complete when CloudFormation or CDK can select any existing launch-template version as the default, rather than always using version 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.