Use localID for eksID to remove some redundancy #818
Merged
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.
This is a less invasive version of #817.
It changes the
eksIDto just be theLocalIDof the cluster (rather than also including region and AWS account ID which is redundant because it's already part of the ARN).LocalIDshould be unique in the account and if we go with the patternAlias == LocalIDthen it's kind of implied.When creating clusters via
aws-account-creatorwith--local-id=kube-1(what we do today) this would lead tokube-1as both the CF Stack and EKS cluster name which seems reasonable.If we start to create EKS clusters where the localID is equal to alias (e.g.
--local-id=teapot) this would lead toteapotas both the CF Stack and EKS cluster name. With this it's more understandable how a second cluster in the same account can live side by side, e.g--local-id=linki-testwill result inlinki-testas both the CF Stack and EKS cluster name.In practice I think it makes sense to create EKS clusters with, e.g.
--local-id=cluster-teapot. This would lead tocluster-teapotas both the CF Stack and EKS cluster name and avoids clashes with another CF Stack that's calledteapot. We do the same for the node pool Stacks, where we prefix each of them withnodepool-.In any case, with this change, we can still pursue both variants.