Attaches a load balancer to an Auto Scaling group.
# Create a new load balancer attachment
resource "aws_autoscaling_attachment" "example" {
autoscaling_group_name = aws_autoscaling_group.example.id
elb = aws_elb.example.id
}
# Create a new ALB Target Group attachment
resource "aws_autoscaling_attachment" "example" {
autoscaling_group_name = aws_autoscaling_group.example.id
lb_target_group_arn = aws_lb_target_group.example.arn
}
This resource supports the following arguments:
autoscaling_group_name
- (Required) Name of ASG to associate with the ELB.elb
- (Optional) Name of the ELB.lb_target_group_arn
- (Optional) ARN of a load balancer target group.This resource exports no additional attributes.