github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/website/source/docs/providers/aws/r/autoscaling_notification.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_autoscaling_notification" 4 sidebar_current: "docs-aws-resource-autoscaling-notification" 5 description: |- 6 Provides an AutoScaling Group with Notification support 7 --- 8 9 # aws\_autoscaling\_notification 10 11 Provides an AutoScaling Group with Notification support, via SNS Topics. Each of 12 the `notifications` map to a [Notification Configuration][2] inside Amazon Web 13 Services, and are applied to each AutoScaling Group you supply. 14 15 ## Example Usage 16 17 Basic usage: 18 19 ``` 20 resource "aws_autoscaling_notification" "example_notifications" { 21 group_names = [ 22 "${aws_autoscaling_group.bar.name}", 23 "${aws_autoscaling_group.foo.name}", 24 ] 25 notifications = [ 26 "autoscaling:EC2_INSTANCE_LAUNCH", 27 "autoscaling:EC2_INSTANCE_TERMINATE", 28 "autoscaling:EC2_INSTANCE_LAUNCH_ERROR" 29 ] 30 topic_arn = "${aws_sns_topic.example.arn}" 31 } 32 33 resource "aws_sns_topic" "example" { 34 name = "example-topic" 35 # arn is an exported attribute 36 } 37 38 resource "aws_autoscaling_group" "bar" { 39 name = "foobar1-terraform-test" 40 [... ASG attributes ...] 41 } 42 43 resource "aws_autoscaling_group" "foo" { 44 name = "barfoo-terraform-test" 45 [... ASG attributes ...] 46 } 47 ``` 48 49 ## Argument Reference 50 51 The following arguments are supported: 52 53 * `group_names` - (Required) A list of AutoScaling Group Names 54 * `notifications` - (Required) A list of Notification Types that trigger 55 notifications. Acceptable are documented [in the AWS documentation here][1] 56 * `topic_arn` - (Required) The Topic ARN for notifications to be sent through 57 58 ## Attributes Reference 59 60 The following attributes are exported: 61 62 * `group_names` 63 * `notifications` 64 * `topic_arn` 65 66 67 [1]: http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_NotificationConfiguration.html 68 [2]: http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_DescribeNotificationConfigurations.html