Files
opentf/website/source/docs/providers/aws/d/autoscaling_groups.html.markdown
Clint a3ae38d1bb docs: Update AWS Data Source docs to have HCL formatted examples (#13467)
* docs: update AWS examples. Disntinguish between alb and alb listener datasource

* more hcl highlighting

* more hcl

* fix missing end quote in docs

* docs: finish updates to AWS data source highlights

Also updates layout to distinguish some resources
2017-04-07 10:54:28 -05:00

1.1 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_autoscaling_groups docs-aws-datasource-autoscaling-groups Provides a list of Autoscaling Groups within a specific region.

aws_autoscaling_groups

The Autoscaling Groups data source allows access to the list of AWS ASGs within a specific region. This will allow you to pass a list of AutoScaling Groups to other resources.

Example Usage

data "aws_autoscaling_groups" "groups" {}

resource "aws_autoscaling_notification" "slack_notifications" {
  group_names = ["${data.aws_autoscaling_groups.groups.names}"]

  notifications = [
    "autoscaling:EC2_INSTANCE_LAUNCH",
    "autoscaling:EC2_INSTANCE_TERMINATE",
    "autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
    "autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
  ]

  topic_arn = "TOPIC ARN"
}

Argument Reference

The data source currently takes no arguments as it uses the current region in which the provider is currently operating.

Attributes Reference

The following attributes are exported:

  • names - A list of the Autoscaling Groups in the current region.