-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix: Adding a 'legacy_names' var to support older v17 name schemes #1996
Conversation
we have provided support for |
Thanks @bryantbiggs for taking the time with your comment. I'm already aware of the Using the v18 defaults, TF plan shows many changes like this. The hyphen is an added change that forces a replacement, but so is the addition of "-cluster".
Setting an empty Here are some excerpts from the upgrade plan (v17.24 -> v18.9) using Cluster IAM Role name change forces replacement:
Cluster Security Group name change forces replacement:
Replacing either the cluster security group or the cluster IAM role will force a replacement of the EKS cluster itself.
Adding a |
have you tried setting: prefix_separator = ""
iam_role_name = $CLUSTER_NAME
cluster_security_group_name = $CLUSTER_NAME
cluster_security_group_description = "EKS cluster security group." Ref: #1744 (comment) |
I tried that originally and just set those for another TF plan now. Originally I set those hoping to fix all of the resource renaming, but found node resources still being replaced (as you mentioned earlier). I did miss that these changes will keep the cluster resources (IAM role & security group) though, so thanks for point that out. So the block above allows us to keep existing v17 clusters and we just need to do the node group swap you mentioned earlier. Thanks for taking the time to clarify this! |
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
Adding a true/false variable like
legacy_names
shown here allows users to deploy the v18+ module using the older v17 style naming conventions for resources.Motivation and Context
One of the breaking changes introduced in v18 is a change to the naming_prefixes used by almost all resources. These new naming prefixes cannot be overridden so previous "<worker_name>" resources will be destroyed and replaced by "<worker_name>-node-group" resources or the like.
Adding a
legacy_names
var allows small conditionals that can choose the new v18-style prefixes or the older v17-style prefixes so the v17 resources aren't destroyed/replaced just for a non-functional name change.Breaking Changes
No breaking changes. A
legacy_names
var should default tofalse
so existing deployments would be unaffected.How Has This Been Tested?
Tested during the process of updating our own v17 cluster to v18. The variable defaulting
false
means it will be ignored by any implementation that doesn't actively set it to true in order to use the v17 matching names.