56 lines
1.0 KiB
Terraform
56 lines
1.0 KiB
Terraform
resource "aws_security_group" "lb_sg" {
|
|
name = "${local.global_prefix}-load_balancer_sg"
|
|
description = "Security group for the load balancer"
|
|
vpc_id = var.vpc_id
|
|
|
|
ingress {
|
|
from_port = 80
|
|
to_port = 80
|
|
protocol = "tcp"
|
|
cidr_blocks = ["172.19.0.0/16"]
|
|
}
|
|
|
|
ingress {
|
|
from_port = 443
|
|
to_port = 443
|
|
protocol = "tcp"
|
|
cidr_blocks = ["172.19.0.0/16"]
|
|
}
|
|
|
|
ingress {
|
|
from_port = 8500
|
|
to_port = 8500
|
|
protocol = "tcp"
|
|
cidr_blocks = ["172.19.0.0/16"]
|
|
}
|
|
|
|
ingress {
|
|
from_port = 8501
|
|
to_port = 8501
|
|
protocol = "tcp"
|
|
cidr_blocks = ["172.19.0.0/16"]
|
|
}
|
|
|
|
ingress {
|
|
from_port = 8502
|
|
to_port = 8502
|
|
protocol = "tcp"
|
|
cidr_blocks = ["172.19.0.0/16"]
|
|
}
|
|
|
|
ingress {
|
|
from_port = 8503
|
|
to_port = 8503
|
|
protocol = "tcp"
|
|
cidr_blocks = ["172.19.0.0/16"]
|
|
}
|
|
|
|
|
|
egress {
|
|
from_port = 0
|
|
to_port = 0
|
|
protocol = "-1"
|
|
cidr_blocks = ["0.0.0.0/0"]
|
|
}
|
|
}
|