Custom launch template is not used when creating a new Managed Node Group
See original GitHub issueHello!
- Vote on this issue by adding a 👍 reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already)
Issue details
When creating a new Managed Node Group, I specified a custom (ec2) launch template via launchTemplate.
Though, newly launched EC2 instances do not appear to be using this launch template since the EC2 instance tag name aws:ec2launchtemplate:id refers to the one created by this provider instead.
Steps to reproduce
- Use https://github.com/pulumi/pulumi-eks/tree/master/examples/managed-nodegroups as a starting point
- Create a new launch template as part of your code
const launchTemplate = new aws.ec2.LaunchTemplate("my-launch-template", {
tags: {testTag: "tag value"},
});
- Set the launch template for the managed node group like this
...
launchTemplate: {
id: launchTemplate.id,
version: '$Latest'
}
- Deploy your changes
Expected: The custom launch template is used to launch new EC2 instances. Actual: The default launch template created by this provider is used.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Launch template support - Amazon EKS - AWS Documentation
If you deploy a managed node group without using a custom launch template, this value is automatically set for the node group in...
Read more >Launch Template support for Managed Nodegroups - eksctl
This enables multiple customization options for nodegroups including providing custom AMIs and security groups, and passing user data for node bootstrapping.
Read more >Using Launch Templates to Create AWS EKS Managed Node ...
Not just that we can create a new version of Launch Template with a new instance type say t2.xlarge and the managed node...
Read more >Creating a managed node group - Amazon EKS - 亚马逊云科技
If you don't use a custom launch template when first creating a managed node group, don't use one at a later time for...
Read more >EKS Managed Node Group Module - Terraform Registry
Configuration in this directory creates an EKS Managed Node Group along with ... to providing a custom launch template to allow for custom...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Reopening this with a question from the community Slack:
idis an Output, so you need to interpolate it:More context:
https://www.pulumi.com/registry/packages/aws/api-docs/ec2/launchtemplate/#outputs https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#outputs-and-strings
It is not recommended to use ‘$Latest’ for the launch template version because the AWS API will this as 1 and parse it as drift every time, causing Pulumi to delete-replace it.