diff --git a/aws_auth.tf b/aws_auth.tf index db6dea4708..842a69096b 100644 --- a/aws_auth.tf +++ b/aws_auth.tf @@ -46,7 +46,8 @@ locals { module.node_groups.aws_auth_roles, ) : { - rolearn = role["worker_role_arn"] + # 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( [