From e104080e6b1c101ef442865cf6943d56f1897922 Mon Sep 17 00:00:00 2001 From: Assaf Giladi Date: Tue, 8 Oct 2024 11:10:02 +0300 Subject: [PATCH] fix: target group shortening --- alb.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alb.tf b/alb.tf index 68bb03d7..26c316f6 100644 --- a/alb.tf +++ b/alb.tf @@ -15,7 +15,7 @@ resource "aws_lb" "alb" { resource "aws_lb_target_group" "alb_target_group" { count = var.create_alb ? 1 : 0 - name = substr("${var.prefix}-${var.cluster_name}-lb-target-group", 0, 32) + name = replace(substr("${var.prefix}-${var.cluster_name}-lb-target-group", 0, 32), "/-$/", "") vpc_id = local.vpc_id port = 14000 protocol = "HTTPS"