diff --git a/alb-target-group.tf b/alb-target-group.tf index 3ee4acf..8aa11e3 100644 --- a/alb-target-group.tf +++ b/alb-target-group.tf @@ -150,7 +150,7 @@ resource "random_string" "alb_prefix" { } resource "aws_lb_target_group" "green" { - name = var.compat_keep_target_group_naming ? "${var.cluster_name}-${var.name}-gr" : format("%s-gr-%s", substr("${var.cluster_name}-${replace(var.name,"_" ,"-" )}", 0, 24), random_string.alb_prefix.result) + name = var.compat_keep_target_group_naming ? "${var.cluster_name}-${var.name}-gr" : format("%s-gr-%s", substr("${var.cluster_name}-${replace(var.name, "_", "-")}", 0, 24), random_string.alb_prefix.result) port = var.port protocol = var.protocol vpc_id = var.vpc_id @@ -180,7 +180,7 @@ resource "aws_lb_target_group" "green" { } resource "aws_lb_target_group" "blue" { - name = var.compat_keep_target_group_naming ? "${var.cluster_name}-${var.name}-bl" : format("%s-bl-%s", substr("${var.cluster_name}-${replace(var.name,"_" ,"-" )}", 0, 24), random_string.alb_prefix.result) + name = var.compat_keep_target_group_naming ? "${var.cluster_name}-${var.name}-bl" : format("%s-bl-%s", substr("${var.cluster_name}-${replace(var.name, "_", "-")}", 0, 24), random_string.alb_prefix.result) port = var.port protocol = var.protocol vpc_id = var.vpc_id