Hi Guys:
I’m using terraform to create resource health alert
it is pretty simple with terraform
resource “azurerm_monitor_activity_log_alert” “resourcehealth” {
name = “${var.client_initial}-MCS Optimise Resource Health”
description = “${var.client_initial}-MCS Optimise Resource Health Alerts”
resource_group_name = var.resource_group_name
scopes = [var.scopes]
criteria {
category = "ResourceHealth"
}
action {
action_group_id = var.action_group_id
}
tags = var.tags
}
but what I found is it lacks ability to further set alert condition, for example, we want only get alert when current resource status is degraded or unavailable, and reason type is Platform initiated. Terraform seems to set All for all the conditions, and alert has become quite noisy