Skip to content

Commit 140f598

Browse files
committed
fix: add depends_on to storage class to wait for EKS access entry
The storage class had no implicit dependency on the EKS module (it only references locals from remote state). Terraform created it in parallel with the access entry, racing the RBAC propagation.
1 parent f098412 commit 140f598

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

infra/terraform/3-eks/storage.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ resource "kubernetes_storage_class_v1" "gp3_encrypted" {
2121
encrypted = "true"
2222
kmsKeyId = local.kms_key_arn
2323
}
24+
25+
# Wait for EKS access entry to propagate before talking to the
26+
# K8s API. Without this, the storage class creation races the
27+
# RBAC grant and fails with "forbidden."
28+
depends_on = [module.eks]
2429
}

0 commit comments

Comments
 (0)