# Generated by RepliMap Codify resource "aws_lb" "acme_shop_web" { drop_invalid_header_fields = false enable_deletion_protection = true idle_timeout = "60" load_balancer_type = "application" name = "acme-shop-web" security_groups = [aws_security_group.acme-shop-alb.id] subnets = ["subnet-3bb0afd570fce1aef", "subnet-33c61b056a67b03e2"] tags = { CostCenter = "cc-1042" Environment = "prod" Name = "acme-shop-web" Owner = "platform-team" Project = "acme-shop" } } resource "aws_lb_listener" "acme_shop_web_http_80" { default_action { order = 1 redirect { port = "443" protocol = "HTTPS" status_code = "HTTP_301" } type = "redirect" } load_balancer_arn = aws_lb.acme_shop_web.arn port = 80 protocol = "HTTP" tags = { CostCenter = "cc-1042" Environment = "prod" Name = "5c1e9a7b3d2f4e60" Owner = "platform-team" Project = "acme-shop" } } resource "aws_lb_listener" "acme_shop_web_https_443" { certificate_arn = aws_acm_certificate.origin_acmeshop_example_com.arn default_action { order = 1 target_group_arn = aws_lb_target_group.acme-shop-web-ecs.arn type = "forward" } load_balancer_arn = aws_lb.acme_shop_web.arn port = 443 protocol = "HTTPS" tags = { CostCenter = "cc-1042" Environment = "prod" Name = "5c1e9a7b3d2f4e60" Owner = "platform-team" Project = "acme-shop" } } resource "aws_lb_target_group" "acme-shop-web-ec2" { deregistration_delay = "30" health_check { enabled = true healthy_threshold = 3 interval = 30 matcher = "200" path = "/healthz" port = "traffic-port" protocol = "HTTP" timeout = 5 unhealthy_threshold = 3 } load_balancing_algorithm_type = "round_robin" name = "acme-shop-web-ec2" port = 8080 protocol = "HTTP" tags = { CostCenter = "cc-1042" Environment = "prod" Name = "acme-shop-web-ec2" Owner = "platform-team" Project = "acme-shop" } target_type = "instance" vpc_id = aws_vpc.acme-shop-prod.id } resource "aws_lb_target_group" "acme-shop-web-ecs" { deregistration_delay = "30" health_check { enabled = true healthy_threshold = 3 interval = 30 matcher = "200" path = "/healthz" port = "traffic-port" protocol = "HTTP" timeout = 5 unhealthy_threshold = 3 } load_balancing_algorithm_type = "round_robin" name = "acme-shop-web-ecs" port = 8080 protocol = "HTTP" tags = { CostCenter = "cc-1042" Environment = "prod" Name = "acme-shop-web-ecs" Owner = "platform-team" Project = "acme-shop" } target_type = "ip" vpc_id = aws_vpc.acme-shop-prod.id }