-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use custom launch template when launch_template_name is not specified #1816
Comments
I can confirm this. encountered the same and came to the same code-wise conclusion upon investigation if you dont specify LT-name, it will use the EKS default one instead your custom one base on the provided LT config |
yes, with the repro provided by @tmokmss I am seeing this as well - currently looking into it this morning |
@bryantbiggs btw contrary to @tmokmss suggestion, I for myself experienced it while do using |
I don't follow |
I was just looking around for solutions to my problem and came across this and wondering if it's related. I have under my EKS config.
Everytime I apply it creates a new launch template and recreates the nodes. Nothing appears to be different warranting creating a new launch template. |
@snowzach no they aren't related. can you open a new issue and paste in the output from your plan showing whats triggering the change |
This issue has been resolved in version 18.2.5 🎉 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Hi team, I found a little confusing behavior about
eks-managed-node-group
module.When I don't specify
launch_template_name
and leave it blank, the launch template will not be used by the corresponding managed node group. I've already found why it's happening (details are below), so could you judge if it's is an intended behavior?Versions
Reproduction
Steps to reproduce the behavior:
Deploy a VPC, an EKS cluster, and a managed node group. To reproduce this, we must explicitly use
eks-managed-node-group
module, not usingeks_managed_node_groups
input of the EKS cluster module.Code Snippet to Reproduce
Expected behavior
the resulting ASG uses the custom launch template.
Actual behavior
the resulting ASG uses the default launch template.
Looking at tfstate, launch_template field in
eks_node_group
resource is empty.Terminal Output Screenshot(s)
Additional context
The behavior is due to the code below. When
launch_template_name
is undefined, it won't register the custom launch template to the managed node group.terraform-aws-eks/modules/eks-managed-node-group/main.tf
Lines 32 to 33 in 16f46db
terraform-aws-eks/modules/eks-managed-node-group/main.tf
Lines 292 to 298 in 16f46db
We might need another condition to define
use_custom_launch_template
variable.BTW if we use
eks_managed_node_groups
input to deploy managed node groups, the problem won't happen becauselaunch_template_name
is always defined internally here.terraform-aws-eks/node_groups.tf
Line 272 in 16f46db
Thanks!
The text was updated successfully, but these errors were encountered: