File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ resource "azurerm_monitor_activity_log_alert" "monitor_activity_log_alert_service_health" {
2+ name = " ${ local . prefix } -alert-servicehealth"
3+ resource_group_name = azurerm_resource_group. logging_rg . name
4+ tags = var. tags
5+
6+ enabled = true
7+ description = " Alerts about service health and maintenance events."
8+ scopes = [
9+ data . azurerm_subscription . current . id
10+ ]
11+ action {
12+ action_group_id = azurerm_monitor_action_group. monitor_action_group . id
13+ webhook_properties = {
14+ " alert-type" = " service-health" ,
15+ " location" = var.location
16+ " environment" = var.environment
17+ " subscription" = data.azurerm_client_config.current.subscription_id
18+ " severity" = " Info"
19+ }
20+ }
21+ criteria {
22+ category = " ServiceHealth"
23+ service_health {
24+ events = [
25+ " Incident" ,
26+ " Maintenance"
27+ ]
28+ locations = [
29+ " Global" ,
30+ data . azurerm_location . current . display_name
31+ ]
32+ }
33+ }
34+ }
Original file line number Diff line number Diff line change 11data "azurerm_client_config" "current" {}
22
3+ data "azurerm_subscription" "current" {}
4+
5+ data "azurerm_location" "current" {
6+ location = var. location
7+ }
8+
39data "azurerm_virtual_network" "virtual_network" {
410 name = local. virtual_network . name
511 resource_group_name = local. virtual_network . resource_group_name
You can’t perform that action at this time.
0 commit comments