terraform-aws-eks icon indicating copy to clipboard operation
terraform-aws-eks copied to clipboard

cluster_creator cannot create resources

Open cdenneen opened this issue 1 year ago β€’ 0 comments

So I'm setting enable_cluster_creator_admin_permissions = true to allow the TF role assumed to continue to create resources on the cluster. I was doing this with the old config-maps adding this user to system:masters. I've removed that user from the config-map in favor of trying not to use that anymore with the access entries replacement, slowly removing all of them, but when TF runs now it can't create things like namespaces or configmaps:

β•·
β”‚ Error: namespaces is forbidden: User "arn:aws:sts::REDACTED:assumed-role/terraform-role/EKSGetTokenAuth" cannot create resource "namespaces" in API group "" at the cluster scope
β”‚ 
β”‚   with module.eks-addons[0].module.eks_blueprints_addons.kubernetes_namespace_v1.aws_observability[0],
β”‚   on .terraform/modules/eks-addons.eks_blueprints_addons/main.tf line 2557, in resource "kubernetes_namespace_v1" "aws_observability":
β”‚ 2557: resource "kubernetes_namespace_v1" "aws_observability" {
β”‚ 
β•΅
β•·
β”‚ Error: Have got the following error while validating the existence of the ConfigMap "aws-auth": configmaps "aws-auth" is forbidden: User "arn:aws:sts::REDACTED:assumed-role/terraform-role/EKSGetTokenAuth" cannot get resource "configmaps" in API group "" in the namespace "kube-system"
β”‚ 
β”‚   with module.k8s-cluster.module.aws-auth.kubernetes_config_map_v1_data.aws_auth[0],
β”‚   on .terraform/modules/k8s-cluster.aws-auth/modules/aws-auth/main.tf line 31, in resource "kubernetes_config_map_v1_data" "aws_auth":
β”‚   31: resource "kubernetes_config_map_v1_data" "aws_auth" {
β”‚ 

cdenneen avatar Feb 27 '24 23:02 cdenneen