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

19 lines
902 B
Terraform
Raw Normal View History

2022-12-08 10:42:05 +08:00
resource "aws_cloudwatch_metric_alarm" "tgw-PacketDropCountNoRoute" {
for_each = var.settings
alarm_name = "${each.value["ecccode"]}-TGW_${var.tgw-id}-PacketDropCountNoRoute"
comparison_operator = each.value["comparison_operator"]
evaluation_periods = each.value["evaluation_periods"]
metric_name = each.value["metric"]
period = each.value["period"]
statistic = each.value["statistic"]
threshold = each.value["threshold"]
alarm_description = "TGW:${each.value["metric"]}"
2022-12-08 10:42:05 +08:00
namespace = "AWS/TransitGateway"
insufficient_data_actions = []
actions_enabled = var.actions-enabled
alarm_actions = [each.value["action"]]
ok_actions = [each.value["action"]]
2022-12-08 10:42:05 +08:00
dimensions = {
TransitGateway = var.tgw-id
}
}