Health problems finally solved with LB and fargate
This commit is contained in:
parent
edbb647c18
commit
bdeb59e46d
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user