I just found out, if we create azure service health alert with terraform, with below code
resource "azurerm_monitor_activity_log_alert" "servicehealth" {
name = "${var.client_initial}-MCS Maintain Service Health"
description = "${var.client_initial}-MCS Maintain Service Health Alerts"
resource_group_name = var.resource_group_name
scopes = [var.scopes]
criteria {
category = "ServiceHealth"
}
tags = var.tags
action {
action_group_id = var.action_group_id
}
}
when I do terraform apply, it applies fine, but when I check on portal, no region is selected. You can't do the same via portal, if you do via portal, you have to select region or select all regions.
so if deploy via terraform and no region is selected, does that mean it applies to all regions?
i see on github, more granular control on this is still an open issue https://github.com/terraform-providers/terraform-provider-azurerm/issues/2996