Skip to content

fix(efa): use full IAM role names to avoid 38-char name_prefix cap#726

Open
sky333999 wants to merge 1 commit into
mainfrom
efa-name-prefix-fix
Open

fix(efa): use full IAM role names to avoid 38-char name_prefix cap#726
sky333999 wants to merge 1 commit into
mainfrom
efa-name-prefix-fix

Conversation

@sky333999

@sky333999 sky333999 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description of changes

#721 standardized the efa and otel-multi-efa EKS integration-test cluster names to the shared
cwagent-eks-integ- prefix so the cluster-cleaner allowlist covers them. But those two tests build their
cluster via the terraform-aws-modules/eks v21 module, which derives the cluster IAM role name from
"<cluster-name>-cluster-" as an IAM role name_prefix (max 38 chars). The standardized name makes that
43 chars, so terraform apply fails before the test runs:

Error: expected length of name_prefix to be in the range (1 - 38), got cwagent-eks-integ-<id>-cluster-

Only these two tests are affected — every other EKS test uses a raw aws_eks_cluster with an
explicitly-named IAM role (name, 64-char limit), not the module's 38-capped name_prefix.

Fix: set iam_role_use_name_prefix = false on the eks module (cluster) and on each managed node group, so
the module uses the full role name (IAM limit 64) instead of the 38-capped prefix. The standardized cluster
name is unchanged, so #721's cluster-cleaner allowlist still matches.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this
contribution, under the terms of your choice.

Tests

@sky333999
sky333999 requested a review from a team as a code owner July 17, 2026 23:33
@sky333999
sky333999 force-pushed the efa-name-prefix-fix branch from 6b4c8b3 to dff5b58 Compare July 17, 2026 23:34
Standardizing the efa and otel-multi-efa cluster names to the shared cwagent-eks-integ- prefix (#721) pushed the terraform-aws-modules/eks v21 derived cluster IAM role name_prefix "<name>-cluster-" to 43 chars, over the 38-char name_prefix limit, so terraform apply fails before the tests run: expected length of name_prefix to be in the range (1 - 38), got cwagent-eks-integ-<id>-cluster-.

Set iam_role_use_name_prefix = false on the eks module (cluster) and on the managed node groups so the module uses the full role name (<= 64) instead of the 38-capped prefix. The standardized cluster name is unchanged, so the cluster-cleaner allowlist from #721 still matches. Only the two module-based EFA clusters were affected; other EKS tests use raw aws_eks_cluster with explicitly-named IAM roles.
@sky333999
sky333999 force-pushed the efa-name-prefix-fix branch from dff5b58 to fec0fd5 Compare July 17, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant