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

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_alb_target_group_attachment"
     4  sidebar_current: "docs-aws-resource-alb-target-group-attachment"
     5  description: |-
     6    Provides the ability to register instances and containers with an ALB
     7    target group
     8  ---
     9  
    10  # aws\_alb\_target\_group\_attachment
    11  
    12  Provides the ability to register instances and containers with an ALB
    13  target group
    14  
    15  ## Example Usage
    16  
    17  ```hcl
    18  resource "aws_alb_target_group_attachment" "test" {
    19    target_group_arn = "${aws_alb_target_group.test.arn}"
    20    target_id        = "${aws_instance.test.id}"
    21    port             = 80
    22  }
    23  
    24  resource "aws_alb_target_group" "test" {
    25    // Other arguments
    26  }
    27  
    28  resource "aws_instance" "test" {
    29    // Other arguments
    30  }
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `target_group_arn` - (Required) The ARN of the target group with which to register targets
    38  * `target_id` (Required) The ID of the target. This is the Instance ID for an instance, or the container ID for an ECS container.
    39  * `port` - (Optional) The port on which targets receive traffic.
    40  
    41  ## Attributes Reference
    42  
    43  The following attributes are exported in addition to the arguments listed above:
    44  
    45  * `id` - A unique identifier for the attachment
    46  
    47  ## Import
    48  
    49  Target Group Attachments cannot be imported.
    50