Health problems finally solved with LB and fargate

This commit is contained in:
shockrah 2023-01-02 19:08:25 -08:00
parent edbb647c18
commit bdeb59e46d
3 changed files with 22 additions and 1 deletions

View File

@ -9,7 +9,10 @@ resource "aws_lb" "alpha" {
internal = false
load_balancer_type = "application"
subnets = [ aws_subnet.delphi.id, aws_subnet.crete_subnet.id ]
security_groups = [ aws_security_group.ecs_web_ingress.id ]
security_groups = [
aws_security_group.ecs_web_ingress.id,
aws_security_group.load_balancer_health_check.id
]
# TODO: change this to true later
enable_deletion_protection = false
}

View File

@ -10,7 +10,14 @@ resource "aws_route_table" "crete_route_table" {
Name = "Crete IGW Route Table"
}
}
resource "aws_route_table_association" "crete_gateway_association" {
subnet_id = aws_subnet.crete_subnet.id
route_table_id = aws_route_table.crete_route_table.id
}
resource "aws_route_table_association" "delphi_gateway_association" {
subnet_id = aws_subnet.delphi.id
route_table_id = aws_route_table.crete_route_table.id
}

View File

@ -40,6 +40,17 @@ resource "aws_security_group" "base_ecs" {
}
}
resource "aws_security_group" "load_balancer_health_check" {
name = "Load Balancer Health check"
vpc_id = aws_vpc.athens_vpc.id
egress {
cidr_blocks = ["10.0.0.0/8"]
from_port = 80
to_port = 80
protocol = "tcp"
}
}
resource "aws_security_group" "general_web_req" {
name = "Athens General web server ruleset"
description = "Allowing strictly web traffic"