From 58cd90df31084719c244e6e32afa765f93669bbe Mon Sep 17 00:00:00 2001 From: Accurics Date: Mon, 21 Feb 2022 14:44:30 +0530 Subject: [PATCH] Auto Remediation By Accurics --- terraform/aws/modules/network/main.tf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terraform/aws/modules/network/main.tf b/terraform/aws/modules/network/main.tf index 8510db58..fa2eb4ed 100644 --- a/terraform/aws/modules/network/main.tf +++ b/terraform/aws/modules/network/main.tf @@ -154,9 +154,10 @@ resource "aws_security_group" "km_ecs_sg" { } resource "aws_lb" "km_lb" { - name = "km-lb-${var.environment}" - subnets = aws_subnet.km_public_subnet.*.id - security_groups = [aws_security_group.km_alb_sg.id] + name = "km-lb-${var.environment}" + subnets = aws_subnet.km_public_subnet.*.id + security_groups = [aws_security_group.km_alb_sg.id] + enable_cross_zone_load_balancing = true } resource "aws_lb_target_group" "km_lb_target" { @@ -165,7 +166,7 @@ resource "aws_lb_target_group" "km_lb_target" { protocol = "HTTP" vpc_id = aws_vpc.km_vpc.id target_type = "ip" - depends_on = [ aws_lb.km_lb ] + depends_on = [aws_lb.km_lb] } # Redirect all traffic from the ALB to the target group