diff --git a/locals.tf b/locals.tf index d34a82d2..d749f22e 100755 --- a/locals.tf +++ b/locals.tf @@ -87,6 +87,9 @@ locals { launch_template_use_name_prefix = true launch_template_tags = { Name = "${local.cluster_name}-default" } tags = var.autoscaling_enabled ? merge(local.tags, { key = "k8s.io/cluster-autoscaler/${local.cluster_name}", value = "owned", propagate_at_launch = true }, { key = "k8s.io/cluster-autoscaler/enabled", value = "true", propagate_at_launch = true }) : local.tags + # Node Pool IAM Configuration + iam_role_use_name_prefix = false + iam_role_name = "${var.prefix}-default-eks-node-group" } } @@ -133,6 +136,9 @@ locals { launch_template_use_name_prefix = true launch_template_tags = { Name = "${local.cluster_name}-${key}" } tags = var.autoscaling_enabled ? merge(local.tags, { key = "k8s.io/cluster-autoscaler/${local.cluster_name}", value = "owned", propagate_at_launch = true }, { key = "k8s.io/cluster-autoscaler/enabled", value = "true", propagate_at_launch = true }) : local.tags + # Node Pool IAM Configuration + iam_role_use_name_prefix = false + iam_role_name = "${var.prefix}-${key}-eks-node-group" } }