Skip to content

Commit

Permalink
Fix Terraform code in continuous_integration_continuous_deployment.md (
Browse files Browse the repository at this point in the history
…#1182)

There's currently a mismatch between the load balancer listener (port 80) and the container port (8000). Because of this, the task never becomes healthy (since the health checks are directed towards the wrong port).
  • Loading branch information
iuliaturc authored Dec 5, 2024
1 parent 085a9d3 commit a65c0f7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ resource "aws_lb_listener" "app_lb_listener" {
resource "aws_lb_target_group" "app_lb" {
name = "${local.deployment_name}-nlb-tg"
protocol = "TCP"
port = 80
port = var.backend_server_port
vpc_id = aws_vpc.backend.id
target_type = "ip"
Expand All @@ -650,6 +650,7 @@ resource "aws_lb_target_group" "app_lb" {
timeout = "3"
unhealthy_threshold = "3"
path = "/"
port = var.backend_server_port
}
lifecycle {
Expand Down

0 comments on commit a65c0f7

Please sign in to comment.