github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/aws/d/autoscaling_groups.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_autoscaling_groups"
     4  sidebar_current: "docs-aws-datasource-autoscaling-groups"
     5  description: |-
     6      Provides a list of Autoscaling Groups within a specific region.
     7  ---
     8  
     9  # aws\_autoscaling\_groups
    10  
    11  The Autoscaling Groups data source allows access to the list of AWS
    12  ASGs within a specific region. This will allow you to pass a list of AutoScaling Groups to other resources.
    13  
    14  ## Example Usage
    15  
    16  ```hcl
    17  data "aws_autoscaling_groups" "groups" {
    18    filter {
    19      name = "key"
    20      values = ["Team"]
    21    }
    22  
    23    filter {
    24      name = "value"
    25      values = ["Pets"]
    26    }
    27  }
    28  
    29  resource "aws_autoscaling_notification" "slack_notifications" {
    30    group_names = ["${data.aws_autoscaling_groups.groups.names}"]
    31  
    32    notifications = [
    33      "autoscaling:EC2_INSTANCE_LAUNCH",
    34      "autoscaling:EC2_INSTANCE_TERMINATE",
    35      "autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
    36      "autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
    37    ]
    38  
    39    topic_arn = "TOPIC ARN"
    40  }
    41  ```
    42  
    43  ## Argument Reference
    44  
    45  * `filter` - (Optional) A filter used to scope the list e.g. by tags. See [related docs](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_Filter.html).
    46    * `name` - (Required) The name of the filter. The valid values are: `auto-scaling-group`, `key`, `value`, and `propagate-at-launch`.
    47    * `values` - (Required) The value of the filter.
    48  
    49  ## Attributes Reference
    50  
    51  The following attributes are exported:
    52  
    53  * `names` - A list of the Autoscaling Groups in the current region.