Skip to content

Commit

Permalink
Modifing time for health checks in target group
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Elhaiek committed Apr 11, 2024
1 parent 2db5792 commit 8efb1e0
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions terraform/alb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ resource "aws_lb" "vectorstore_nlb" {
}


# resource "aws_security_group" "api_gateway_sg" {
# name = "api-gateway-sg"
# description = "Security group for API Gateway"
# vpc_id = aws_vpc.vectorstore_vpc.id

# tags = {
# Name = "APIGatewaySG"
# }
# }




resource "aws_security_group" "nlb_sg" {
name = "nlb-sg"
Expand All @@ -57,6 +69,13 @@ resource "aws_security_group" "nlb_sg" {
cidr_blocks = ["0.0.0.0/0"]
}

# ingress {
# from_port = 80
# to_port = 80
# protocol = "tcp"
# security_groups = [aws_security_group.api_gateway_sg.id] # Reference the API Gateway's security group
# }

egress {
from_port = 0
to_port = 0
Expand All @@ -81,10 +100,10 @@ resource "aws_lb_target_group" "ecs_target" {
path = "/health" // Specify a path that your application responds to with HTTP 200
port = "traffic-port" // Use the traffic port
interval = 120
healthy_threshold = 4
unhealthy_threshold = 2
healthy_threshold = 2
unhealthy_threshold = 3
matcher = "200" // Expect a 200 OK response for a healthy status
timeout = 110
timeout = 100
}
}

Expand Down

0 comments on commit 8efb1e0

Please sign in to comment.