Hi All, I need help, please.
I am using terraform-aws-eks to create a simple cluster. I have this in my eks.tf file:
Cluster access entry
To add the current caller identity as an administrator
enable_cluster_creator_admin_permissions = true
access_entries = {
# One access entry with a policy associated
example = {
kubernetes_groups =
principal_arn = “arn:aws:iam::123456789:role/aws-reserved/sso.amazonaws.com/us-west-2/AWSReservedSSO_AWSAdministratorAccess_123456789”
policy_associations = {
example = {
policy_arn = “arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy”
access_scope = {
namespaces = [“default”]
type = “namespace”
}
}
}
}
}
and when I run it I get this error:
│ Error: creating EKS Access Entry (sandbox3:arn:aws:iam::123456789:role/aws-reserved/sso.amazonaws.com/us-west-2/AWSReservedSSO_AWSAdministratorAccess_123456789): operation error EKS: CreateAccessEntry, https response error StatusCode: 409, RequestID: 21c37882-5cef-417c-b931-bf7508d4562f, ResourceInUseException: The specified access entry resource is already in use on this cluster.
│
│ with module.eks.aws_eks_access_entry.this[“example”],
│ on .terraform/modules/eks/main.tf line 200, in resource “aws_eks_access_entry” “this”:
│ 200: resource “aws_eks_access_entry” “this” {
│
and I can’t list the node groups after this. What am I doing wrong?