terraform.aws-baseline-infra/modules/ManagementGovernance/Monitoring.TGW/main.tf

22 lines
912 B
Terraform
Raw Normal View History

2022-12-08 10:42:05 +08:00
resource "aws_cloudwatch_metric_alarm" "tgw-PacketDropCountNoRoute" {
alarm_name = "${var.cw-alarm-prefix}:TGW:PacketDropCountNoRoute:${var.tgw-id}"
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "2"
metric_name = "PacketDropCountNoRoute"
period = "300"
statistic = "Average"
threshold = var.threshold-PacketDropCountNoRoute
alarm_description = "TGW:PacketDropCountNoRoute"
namespace = "AWS/TransitGateway"
insufficient_data_actions = []
actions_enabled = var.actions-enabled
alarm_actions = [var.sns-targets.alarm-actions-standard]
ok_actions = [var.sns-targets.alarm-actions-standard]
dimensions = {
TransitGateway = var.tgw-id
}
tags = var.default-tags
lifecycle {
ignore_changes = [tags]
}
}