github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/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 19 resource "aws_autoscaling_notification" "slack_notifications" { 20 group_names = ["${data.aws_autoscaling_groups.groups.names}"] 21 22 notifications = [ 23 "autoscaling:EC2_INSTANCE_LAUNCH", 24 "autoscaling:EC2_INSTANCE_TERMINATE", 25 "autoscaling:EC2_INSTANCE_LAUNCH_ERROR", 26 "autoscaling:EC2_INSTANCE_TERMINATE_ERROR", 27 ] 28 29 topic_arn = "TOPIC ARN" 30 } 31 ``` 32 33 ## Argument Reference 34 35 The data source currently takes no arguments as it uses the current region in which the provider is currently operating. 36 37 ## Attributes Reference 38 39 The following attributes are exported: 40 41 * `names` - A list of the Autoscaling Groups in the current region.