github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/autoscaling_attachment.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_autoscaling_attachment"
     4  sidebar_current: "docs-aws-resource-autoscaling-attachment"
     5  description: |-
     6    Provides an AutoScaling Group Attachment resource.
     7  ---
     8  
     9  # aws\_autoscaling\_attachment
    10  
    11  Provides an AutoScaling Attachment resource.
    12  
    13  ~> **NOTE on AutoScaling Groups and ASG Attachments:** Terraform currently provides
    14  both a standalone ASG Attachment resource (describing an ASG attached to
    15  an ELB), and an [AutoScaling Group resource](autoscaling_group.html) with
    16  `load_balancers` defined in-line. At this time you cannot use an ASG with in-line
    17  load balancers in conjunction with an ASG Attachment resource. Doing so will cause a
    18  conflict and will overwrite attachments.
    19  
    20  ## Example Usage
    21  
    22  ```hcl
    23  # Create a new load balancer attachment
    24  resource "aws_autoscaling_attachment" "asg_attachment_bar" {
    25    autoscaling_group_name = "${aws_autoscaling_group.asg.id}"
    26    elb                    = "${aws_elb.bar.id}"
    27  }
    28  ```
    29  
    30  ```hcl
    31  # Create a new ALB Target Group attachment
    32  resource "aws_autoscaling_attachment" "asg_attachment_bar" {
    33    autoscaling_group_name = "${aws_autoscaling_group.asg.id}"
    34    alb_target_group_arn   = "${aws_alb_target_group.test.arn}"
    35  }
    36  ```
    37  
    38  ## Argument Reference
    39  
    40  The following arguments are supported:
    41  
    42  * `autoscaling_group_name` - (Required) Name of ASG to associate with the ELB.
    43  * `elb` - (Optional) The name of the ELB.
    44  * `alb_target_group_arn` - (Optional) The ARN of an ALB Target Group.
    45