Allow overriding of prefix separator in self-managed node groups #3600
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
Add a
prefix_separatorvariable into theself_managed_node_groupsvariable schema, and use it to override the hard-coded '-' separator when providingname_prefixvalues to underlying AWS resources. This is functionally identical to theprefix_separatorvariable on the top level-variable definition.Motivation and Context
I've found that when upgrading from v17 when using a self-managed node group, that the
aws_launch_templateresource can take a while to replace (around 7 minutes) and in that time, the cluster is not able to receive any incoming traffic.In the v18 upgrade guide, the strategy around using the
prefix_separatorto replace '-' with '' works well with respect to ensuring that the EKS cluster itself can be updated in-place, however the same strategy cannot be applied to the AWS Launch template resource due to the hard coded hyphen separator.Breaking Changes
No breaking changes. I did consider propagating the
prefix_separatordirectly from the top-level variable schema, however decided against that as it would potentially create breaking behaviour for existing users.How Has This Been Tested?
examples/*to demonstrate and validate my change(s)examples/*projectspre-commit run -aon my pull requestFor testing:
masterbranch.terraform plan.prefix_separatorof-.I didn't see any use of straying from using the default names in the
examplesdirectory, so I didn't add anything to it, but am happy to update it if desired.