-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alerts.tf
35 lines (34 loc) · 1017 Bytes
/
alerts.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
resource "azurerm_monitor_activity_log_alert" "monitor_activity_log_alert_service_health" {
name = "${local.prefix}-alert-servicehealth"
location = "global"
resource_group_name = azurerm_resource_group.logging_rg.name
tags = var.tags
enabled = true
description = "Alerts about service health and maintenance events."
scopes = [
data.azurerm_subscription.current.id
]
action {
action_group_id = azurerm_monitor_action_group.monitor_action_group.id
webhook_properties = {
"alert-type" = "service-health",
"location" = var.location
"environment" = var.environment
"subscription" = data.azurerm_client_config.current.subscription_id
"severity" = "Info"
}
}
criteria {
category = "ServiceHealth"
service_health {
events = [
"Incident",
"Maintenance"
]
locations = [
"Global",
data.azurerm_location.current.display_name
]
}
}
}