Skip to content

fix(eks): silence perpetual serviceAccountRoleArn diff on CSI-driver addons#341

Draft
stevenolen wants to merge 1 commit into
mainfrom
eks-addon-sa-role-ignore
Draft

fix(eks): silence perpetual serviceAccountRoleArn diff on CSI-driver addons#341
stevenolen wants to merge 1 commit into
mainfrom
eks-addon-sa-role-ignore

Conversation

@stevenolen

Copy link
Copy Markdown
Contributor

What

Add serviceAccountRoleArn to IgnoreChanges on the EBS and EFS CSI managed-addon resources in the EKS cluster builder.

Why

The AWS provider writes service_account_role_arn on create/update but does not reliably read it back into state (terraform-provider-aws#19402). As a result Pulumi re-proposes + serviceAccountRoleArn on every dry-run for EKS workloads, and each apply forces an addon reconcile. For the EBS CSI addon that reconcile is the same one that re-asserts the default StorageClass (previously mitigated by ignoring configurationValues).

Ignoring the field is safe: the role ARN is deterministic and set-once, so there is no real drift being hidden, and IgnoreChanges does not affect resource creation, so new clusters still get the role. This is deliberately the opposite of version fields, which must never be ignored.

Testing

  • just cli — build succeeds
  • just check-go — clean
  • just test-lib — all packages pass

The AWS provider sets aws_eks_addon.service_account_role_arn on
create/update but does not reliably read it back into state
(terraform-provider-aws#19402), so Pulumi re-proposes the field on
every dry-run and each apply triggers an addon reconcile. For the EBS
CSI addon that reconcile re-asserts the default StorageClass, the
regression addressed separately via configurationValues IgnoreChanges.

Add serviceAccountRoleArn to IgnoreChanges on both the EBS and EFS CSI
addons. The role ARN is deterministic and set-once, so ignoring it
masks nothing real, and IgnoreChanges does not affect creates, so
greenfield EKS clusters still receive the role.
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