Enable EKS API auth mode by default - #20
Merged
Merged
Conversation
Adds an access_config block to aws_eks_cluster setting authentication_mode = API_AND_CONFIG_MAP by default, controllable via the new cluster_authentication_mode variable. This unblocks teammates with AWS IAM permissions (e.g. for the observability stack) from being locked out of clusters whose aws-auth ConfigMap is only writable by the original creator. API_AND_CONFIG_MAP keeps backward compatibility: existing aws-auth mappings continue to work, and new access can be granted via AWS Access Entries (eks:CreateAccessEntry / associate-access-policy). On existing clusters, terraform apply performs an in-place update with no node disruption. Note that EKS auth mode transitions are one-way: CONFIG_MAP -> API_AND_CONFIG_MAP -> API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Looks good to me! |
nicholasflintwillow
approved these changes
May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
access_configblock toaws_eks_clusterinterraform-modules/movement-validator-infra/eks.tf.cluster_authentication_modewith a default ofAPI_AND_CONFIG_MAPand validation against the three legal values.Why
With the current default (
CONFIG_MAP), cluster access is gated only by the in-clusterkube-system/aws-authConfigMap. Editing that requires existing cluster admin, which creates a chicken-and-egg dependency on whoever first ranterraform apply. This has blocked teammates with full AWS IAM permissions (e.g. for deploying the observability stack) from accessing clusters they should already be able to manage.Switching to
API_AND_CONFIG_MAP:aws-authmappings working (backward compatible)eks:CreateAccessEntryIAM permission grant access via AWS Access Entries — no in-cluster edit, no dependency on the original creatorWhat changes for existing clusters
On
terraform apply, EKS performs an in-place update of the cluster'saccessConfig. No node disruption, no pod restarts. Existing pods, services, NLBs all keep running.Caveats
CONFIG_MAP → API_AND_CONFIG_MAP → API. You can move forward but never back.API_AND_CONFIG_MAPis chosen as the default because it preserves existing aws-auth mappings.bootstrap_cluster_creator_admin_permissions = truekeeps the historical behavior: the IAM principal that runsterraform applyinitially getssystem:masters.Test plan
terraform planagainst an existing cluster (one oftestnet-v2-vn-XX-clusterinmi:testnet) — confirm in-place update diff only, no replacementterraform applyon one cluster, confirmaws eks describe-cluster --query cluster.accessConfig.authenticationModereturnsAPI_AND_CONFIG_MAPaws-authmappings still work (kubectl get podsfrom current admin)aws eks create-access-entry+associate-access-policyand successfullykubectl get pods🤖 Generated with Claude Code