aws / aws/aws-cdk

(aws-ec2): Add LicenseSpecifications property to launchtemplate and instance

Open
#20,311 2 comments 5 reactions 0 assignees View on GitHub
@aws-cdk/aws-ec2 effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

At the moment setting LicenseSpecifications via the Launchtemplate construct is not implemented.
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-ec2/lib/launch-template.ts#L640

### Use Case

We use EKS managed node groups with the autoscaler and want to track our license consumption over multiple node groups with the license manager.

### Proposed Solution

It is just a property that needs to be mapped from the construct to Cloudformation.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-licensespecifications

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-licensespecifications

### Other Information

Our current workaround involves addPropertyOverride on the underlying CfnLaunchTemplate.

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

1.148.0

### Environment details (OS name and version, etc.)

not relevant to the issue

Contributor guide

Open the contributing guide

Research direction

Start in packages/@aws-cdk/aws-ec2/lib/launch-template.ts around line 640 and trace how Launchtemplate properties reach the underlying CfnLaunchTemplate. Compare the CloudFormation LaunchTemplateData and Instance LicenseSpecifications documentation linked in the issue, then inspect the instance construct path. Done means both constructs expose and map LicenseSpecifications without requiring addPropertyOverride.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
73/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.