diff --git a/aws_auth.tf b/aws_auth.tf index db6dea4708..b583c069a9 100644 --- a/aws_auth.tf +++ b/aws_auth.tf @@ -46,7 +46,9 @@ locals { module.node_groups.aws_auth_roles, ) : { - rolearn = role["worker_role_arn"] + # Work around https://github.com/kubernetes-sigs/aws-iam-authenticator/issues/153 + # Strip the leading slash off so that Terraform doesn't think it's a regex + rolearn = replace(role["worker_role_arn"], replace(var.iam_path, "/^//", ""), "") username = "system:node:{{EC2PrivateDNSName}}" groups = tolist(concat( [