feat: Add option to set instance_type on the launch template #2677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds an extra
instance_type
input variable as an alternative to the existinginstance_types
, so users can decide between setting this on theeks_managed_node_group
or in theaws_launch_template
. I do feel that it might be bad to have two parameters with so similar name, and considered naming it something likelaunch_template_instance_type
, but that also seems to go against the naming style of the other inputs..Motivation and Context
This allows setting the instance type on the launch template rather than the EKS Managed node group. This is useful because it allows using manage node groups rolling update process to change the instance type of a node group. If the instance type is set on the manage node group directly it is not possible to change it without re-creating the node groups. Setting the instance type on in the launch template seems to be the suggested solution for that: aws/containers-roadmap#746 (comment)
Solves: #2503
Breaking Changes
No
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectscomplete
exampleeks_managed_node_group
example, adding node group setting the instance type in the launch template.pre-commit run -a
on my pull request