diff --git a/main.tf b/main.tf index 4817f960471..9d8436ea425 100644 --- a/main.tf +++ b/main.tf @@ -107,7 +107,7 @@ resource "aws_security_group" "cluster" { count = local.create_cluster_sg ? 1 : 0 name = var.cluster_security_group_use_name_prefix ? null : local.cluster_sg_name - name_prefix = var.cluster_security_group_use_name_prefix ? "${local.cluster_sg_name}-" : null + name_prefix = var.cluster_security_group_use_name_prefix ? "${local.cluster_sg_name}" : null description = var.cluster_security_group_description vpc_id = var.vpc_id @@ -191,7 +191,7 @@ resource "aws_iam_role" "this" { count = var.create && var.create_iam_role ? 1 : 0 name = var.iam_role_use_name_prefix ? null : local.iam_role_name - name_prefix = var.iam_role_use_name_prefix ? "${local.iam_role_name}-" : null + name_prefix = var.iam_role_use_name_prefix ? "${local.iam_role_name}" : null path = var.iam_role_path description = var.iam_role_description