2017-01-20 14:21:12 +01:00
|
|
|
---
|
|
|
|
layout: "aws"
|
|
|
|
page_title: "AWS: aws_autoscaling_groups"
|
|
|
|
sidebar_current: "docs-aws-datasource-autoscaling-groups"
|
|
|
|
description: |-
|
2017-02-04 16:47:25 +01:00
|
|
|
Provides a list of Autoscaling Groups within a specific region.
|
2017-01-20 14:21:12 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# aws\_autoscaling\_groups
|
|
|
|
|
|
|
|
The Autoscaling Groups data source allows access to the list of AWS
|
2017-02-04 16:47:25 +01:00
|
|
|
ASGs within a specific region. This will allow you to pass a list of AutoScaling Groups to other resources.
|
2017-01-20 14:21:12 +01:00
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
data "aws_autoscaling_groups" "groups" {}
|
|
|
|
|
|
|
|
resource "aws_autoscaling_notification" "slack_notifications" {
|
|
|
|
group_names = ["${data.aws_autoscaling_groups.groups.names}"]
|
2017-02-18 23:48:50 +01:00
|
|
|
|
|
|
|
notifications = [
|
2017-01-20 14:21:12 +01:00
|
|
|
"autoscaling:EC2_INSTANCE_LAUNCH",
|
|
|
|
"autoscaling:EC2_INSTANCE_TERMINATE",
|
|
|
|
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
|
2017-02-18 23:48:50 +01:00
|
|
|
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
|
2017-01-20 14:21:12 +01:00
|
|
|
]
|
2017-02-18 23:48:50 +01:00
|
|
|
|
2017-01-20 14:21:12 +01:00
|
|
|
topic_arn = "TOPIC ARN"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
2017-02-04 16:47:25 +01:00
|
|
|
The data source currently takes no arguments as it uses the current region in which the provider is currently operating.
|
2017-01-20 14:21:12 +01:00
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
2017-02-04 16:47:25 +01:00
|
|
|
* `names` - A list of the Autoscaling Groups in the current region.
|