diff --git a/modules/node_groups/node_groups.tf b/modules/node_groups/node_groups.tf index 4a3fb17ed21..0dd46032519 100644 --- a/modules/node_groups/node_groups.tf +++ b/modules/node_groups/node_groups.tf @@ -1,11 +1,10 @@ resource "aws_eks_node_group" "workers" { for_each = local.node_groups_expanded - node_group_name_prefix = format("%s-", lookup(each.value, "name", join("-", [var.cluster_name, each.key]))) - - cluster_name = var.cluster_name - node_role_arn = each.value["iam_role_arn"] - subnet_ids = each.value["subnets"] + node_group_name_prefix = lookup(each.value, "name", join("-", [var.cluster_name, each.key])) + cluster_name = var.cluster_name + node_role_arn = each.value["iam_role_arn"] + subnet_ids = each.value["subnets"] scaling_config { desired_size = each.value["desired_capacity"]