title: Using Terraform to create a cloudwatch alert (metric_alarm). How can I use alarm_actions for an individual host?
body: <p>The <a href="https://www.terraform.io/docs/providers/aws/r/cloudwatch_metric_alarm.html" rel="nofollow noreferrer">Terraform documentation</a> covers cloudwatch alarms in the context of autoscaling groups, but not individual instances.</p>
  
  <pre><code>resource "aws_cloudwatch_metric_alarm" "foobar" {
    alarm_name                = "terraform-test-foobar5"
    comparison_operator       = "GreaterThanOrEqualToThreshold"
    evaluation_periods        = "2"
    metric_name               = "CPUUtilization"
    ...
    dimensions {
      InstanceId = "${aws_instance.myOrg-myHost.id}"
    }
  
    alarm_description = "This metric monitors ec2 cpu utilization"
    #This would be for autoscaling
    #alarm_actions     = ["${aws_autoscaling_policy.bat.arn}"]
  }
  </code></pre>
  
  <p>I'm guessing it will be something like:</p>
  
  <pre><code>alarm_actions = ["arn:aws:sns:us-east-1:111122223333:MyTopic"]
  </code></pre>