Support the new alb
target_type in aws_lb_target_group
and aws_lb_target_group_attachment
for Network Load Balancers #21069
Closed
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
AWS have added a new feature to Network Load Balancers, whereby they can now target an ALB via the ALB's ARN. This allows NLBs to perform level 4 load balancing and pass traffic directly to an ALB for level 7 load balancing.
New or Affected Resource(s)
- aws_lb_target_group
- aws_lb_target_group_attachment
Potential Terraform Configuration
resource "aws_lb_target_group" "alb_example" {
name = "tf-example-lb-tg"
port = 80
protocol = "HTTP"
target_type = "alb"
vpc_id = aws_vpc.main.id
}
resource "aws_lb_target_group_attachment" "test" {
target_group_arn = aws_lb_target_group.alb_example.arn
target_id = aws_lb.alb.arn
port = 80
}
References
- Blog post announcing new feature: https://aws.amazon.com/blogs/networking-and-content-delivery/application-load-balancer-type-target-group-for-network-load-balancer/
- https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html
- https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_RegisterTargets.html
- https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DeregisterTargets.html
- https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_TargetGroup.html