Skip to content

Commit

Permalink
Adding resource health alert
Browse files Browse the repository at this point in the history
  • Loading branch information
frasermolyneux committed Dec 23, 2024
1 parent 0e4936f commit 7a28347
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions terraform/resource_health_alerts.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resource "azurerm_monitor_activity_log_alert" "rg_resource_health" {
name = "portal-core - ${var.environment} - ${azurerm_resource_group.rg.name} - resource health"

resource_group_name = azurerm_resource_group.rg.name
location = "global"

scopes = [azurerm_resource_group.rg.id]
description = "Resource health alert for ${azurerm_resource_group.rg.name} resource group"

criteria {
category = "ResourceHealth"

resource_health {
previous = "Available"
}
}

tags = var.tags
}

0 comments on commit 7a28347

Please sign in to comment.