Hooking up a cloudwatch alarm to sns notification

869 views
Skip to first unread message

Mark Jaffe

unread,
Nov 30, 2017, 7:38:27 PM11/30/17
to Terraform
I've seen an example of how to trigger an autoscale-group to cloudwatch, but what is the correct method of sending SNS notification of ELB health degradation? I have created a resource:


resource "aws_cloudwatch_metric_alarm" "elb_warn" {
  alarm_name                = "awselb-${var.service}-Warning-Healthy-Hosts"
  comparison_operator       = "LessThanThreshold"
  evaluation_periods        = "4"
  metric_name               = "HealthyHostCount"
  namespace                 = "AWS/ELB"
  period                    = "3600"
  statistic                 = "Average"
  threshold                 = "2.5"
  alarm_description         = "This metric alerts elb health warning for ${var.service}"
  alarm_actions             = [ "what to put here?" ]
}

David Adams

unread,
Nov 30, 2017, 7:41:06 PM11/30/17
to terrafo...@googlegroups.com
Put the ARN of your SNS topic.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/2bf7721c-c44e-4d61-9cc0-5726fa4fde5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages