resource "aws_lb" "app" { name = "app-alb" internal = true load_balancer_type = "application" } resource "aws_lb_listener" "http" { load_balancer_arn = aws_lb.app.arn port = 80 protocol = "HTTP" default_action { type = "forward" target_group_arn = aws_lb_target_group.app.arn } } resource "aws_lb_target_group" "app" { name = "app-tg" port = 8080 protocol = "HTTP" vpc_id = aws_vpc.main.id } resource "aws_vpc" "main" { cidr_block = "10.0.0.0/16" }