この記事について
以下のようなTerraformコードを作成して、CloudWatch Alarmをバージニアリージョンに作成しようとした。
resource "aws_cloudwatch_metric_alarm" "for_topic" { provider = aws.virginia alarm_name = local.alert.name comparison_operator = "LessThanThreshold" evaluation_periods = "1" metric_name = "HealthCheckStatus" namespace = "AWS/Route53" period = "60" statistic = "Minimum" threshold = "1" alarm_actions = [aws_sns_topic.topic_route53.arn] dimensions = { HealthCheckId = aws_route53_health_check.hoge.id } depends_on = [aws_route53_health_check.hoge] } resource "aws_sns_topic" "topic_route53" { name = local.sns.topic_name tags = { Name = local.sns.topic_name } } resource "aws_sns_topic_subscription" "subscription_firehose" { topic_arn = aws_sns_topic.topic_route53.arn protocol = "firehose" endpoint = aws_kinesis_firehose_delivery_stream.firehose_newrelic.arn subscription_role_arn = aws_iam_role.subscription-firehose.arn }
…