fix: Correct issue where custom launch template is not used when EKS managed node group is used externally#1824
Conversation
…erd` runtime on EKS managed node group
…is used as sub-module
|
|
||
| locals { | ||
| use_custom_launch_template = var.launch_template_name != "" | ||
| use_custom_launch_template = var.create_launch_template || var.launch_template_name != "" |
There was a problem hiding this comment.
this is the fix for ensuring the custom launch template is used when the sub-module is used externally
there are 4 scenarios here which is why it can be a bit weird to understand:
var.create_launch_template = false && var.launch_template_name == ""=> EKS MNG will use its own default LTvar.create_launch_template = false && var.launch_template_name == "something"=> User provided custom LT will be usedvar.create_launch_template = true && var.launch_template_name == ""=> Custom LT will be used, module will provide a default namevar.create_launch_template = true && var.launch_template_name == "something"=> Custom LT will be used, LT name is provided by user
There was a problem hiding this comment.
Maybe put your comment right above this line as a description for this "light magic"? It will be helpful to know the reason in some time.
antonbabenko
left a comment
There was a problem hiding this comment.
Minor comment. LGTM otherwise.
|
|
||
| locals { | ||
| use_custom_launch_template = var.launch_template_name != "" | ||
| use_custom_launch_template = var.create_launch_template || var.launch_template_name != "" |
There was a problem hiding this comment.
Maybe put your comment right above this line as a description for this "light magic"? It will be helpful to know the reason in some time.
### [18.2.5](v18.2.4...v18.2.5) (2022-02-01) ### Bug Fixes * Correct issue where custom launch template is not used when EKS managed node group is used externally ([#1824](#1824)) ([e16b3c4](e16b3c4))
|
This PR is included in version 18.2.5 🎉 |
### [18.2.5](terraform-aws-modules/terraform-aws-eks@v18.2.4...v18.2.5) (2022-02-01) ### Bug Fixes * Correct issue where custom launch template is not used when EKS managed node group is used externally ([#1824](terraform-aws-modules/terraform-aws-eks#1824)) ([926bde2](terraform-aws-modules/terraform-aws-eks@926bde2))
|
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
containerdruntime on EKS managed node groupMotivation and Context
Breaking Changes
How Has This Been Tested?
examples/*projects- Using the
eks-managed-node-groupexample-
eks-manged-node-groupexample was deployed as its defined today- Added in sub-module snippet provided in issue here Cannot use custom launch template when launch_template_name is not specified #1816
- 2nd apply created new node group using external sub-module - confirmed that the node group was not using the custom launch template
- Found issue and made correction on line 33 (see below) - re-ran plan and apply - only the external sub-module node group was affected and it was an update to use the custom launch template (desired affect)