This commit is contained in:
Michaela 2021-10-26 11:46:10 +11:00
parent 630493cb6d
commit 3d6d94e468

50
lb.tf Normal file
View File

@ -0,0 +1,50 @@
# Shared load balancer
resource "aws_lb" "ws" {
name = "ws"
internal = false
load_balancer_type = "application"
security_groups = [aws_security_group.lb.id]
subnets = values(aws_subnet.public)[*].id
enable_deletion_protection = true
}
resource "aws_security_group" "lb" {
ingress = [
{
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
description = ""
prefix_list_ids = []
self = false
security_groups = []
}
]
egress = [
{
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
description = ""
prefix_list_ids = []
self = false
security_groups = []
}
]
vpc_id = aws_vpc.main.id
lifecycle {
ignore_changes = [description, name]
}
}
# TODO
# listener
# lsitener rules