I'm setting up an autoscaling group with a launch template in AWS via Terraform.
When I do it like this, the Target Group expects traffic to come in at port 8080 and then it attaches the machines to the Target Group with port 8080.
I would like the Target Group to listen on port 80 but attach instances on port 8080.
resource "aws_lb_target_group" "this" {
// ... other config
target_type = "instance"
port = 8080
}
resource "aws_autoscaling_group" "this" {
// ... other config
target_group_arns = [aws_lb_target_group.this.arn]
}