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

22 lines
1.1 KiB
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 = var.settings.PacketDropCountNoRoute.comparison_operator
evaluation_periods = var.settings.PacketDropCountNoRoute.evaluation_periods
2022-12-08 10:42:05 +08:00
metric_name = "PacketDropCountNoRoute"
period = var.settings.PacketDropCountNoRoute.period
statistic = var.settings.PacketDropCountNoRoute.statistic
threshold = var.settings.PacketDropCountNoRoute.threshold
2022-12-08 10:42:05 +08:00
alarm_description = "TGW:PacketDropCountNoRoute"
namespace = "AWS/TransitGateway"
insufficient_data_actions = []
actions_enabled = var.actions-enabled
alarm_actions = [var.settings.PacketDropCountNoRoute.action]
ok_actions = [var.settings.PacketDropCountNoRoute.action]
2022-12-08 10:42:05 +08:00
dimensions = {
TransitGateway = var.tgw-id
}
tags = var.default-tags
lifecycle {
ignore_changes = [tags]
}
}