github.com/pbthorste/terraform@v0.8.6-0.20170127005045-deb56bd93da2/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 the specific availablity zone. 7 --- 8 9 # aws\_autoscaling\_groups 10 11 The Autoscaling Groups data source allows access to the list of AWS 12 ASGs within the specific region. This will allow you to pass a list of AutoScaling groups to other resources. 13 14 ## Example Usage 15 16 ``` 17 # Declare the data source 18 data "aws_autoscaling_groups" "groups" {} 19 20 resource "aws_autoscaling_notification" "slack_notifications" { 21 group_names = ["${data.aws_autoscaling_groups.groups.names}"] 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 topic_arn = "TOPIC ARN" 29 } 30 ``` 31 32 ## Argument Reference 33 34 The data source currently takes no arguments as it uses the current region that the provider works in. 35 36 ## Attributes Reference 37 38 The following attributes are exported: 39 40 * `names` - A list of the Autoscaling Groups in the region.