Files
catherine-league/infra/terraform/modules/catherine-fc/main/load-balancer.tf

23 lines
809 B
HCL

resource "aws_lb" "catherine_fc_load_balancer" {
name = "catherine-fc-lb"
internal = false
load_balancer_type = "application"
security_groups = [aws_security_group.catherine_fc_lb_sg.id]
subnets = var.internal_subnet_ids
enable_deletion_protection = true
tags = var.tags
}
resource "aws_lb_listener" "catherine_fc_load_balancer_listener" {
load_balancer_arn = aws_lb.catherine_fc_load_balancer.arn
port = "443"
protocol = "HTTPS"
ssl_policy = "ELBSecurityPolicy-TLS-1-2-Ext-2018-06"
certificate_arn = "arn:aws:acm:ap-northeast-1:353699021357:certificate/df8e9911-1f45-4e3f-90cb-4c34f3ed3e50"
default_action {
type = "forward"
target_group_arn = aws_lb_target_group.target_group_web.arn
}
}