[feature] Implement Azure Monitor - Service Health Alerts #50
Labels
enhancement
New feature or request
landingzone_caf_foundations
Related to landingzone_caf_foundations
Is your feature request related to a problem? Please describe.
Would like to add a feature enhancement of Monitoring Module in to the CAF Foundations. The Module may include the monitoring and alerts elements that may be needed in the Landing Zone.
Describe the solution you'd like
Planned inclusion:
landingzone_caf_foundations
|_ blueprint_foundations_monitoring --> New
|_ Service health Alerts
An alert/set of alerts to be triggered in the event of :
Components to be created:
Pseudo Code
resource "azurerm_monitor_action_group" "ag1" {
name = var.name
resource_group_name = var.rg
short_name = var.shortname
enabled = #boolean_value from variable set
dynamic "email_receiver" {
for_each = enable_email_alert == false ? [] : [1] # decider from variable set
content {
#from variable set
}
}
dynamic "sms_receiver" {
for_each = enable_sms_alert == false? [] : [1] # decider from variable set
content {
#from variable set
}
}
dynamic "webhook_receiver" {
for_each = enable_webhook_trigger == false ? [] : [1] # decider from variable set
content {
#from variable set
}
}
dynamic "arm_role_receiver" {
for_each = enable_arm_role_alert == false ? [] : [1] # decider from variable set
content {
#from variable set
}
}
}
#Due to the current limitations of 'azurerm_monitor_activity_log_alert' Resource, implementing this alert using ARM Template.
resource "azurerm_template_deployment" "alert1" {
name = "random_name"
resource_group_name = var.rg
template_body = file("${path.module}/filename.json")
parameters = {
"name" = "name"
"actionGroups_name" = azurerm_monitor_action_group.ag1.name
"region" = "${join(",", var.alert_settings.service_health_alerts.location)}" #from variable set
}
deployment_mode = "Incremental"
}
Reference
hashicorp/terraform-provider-azurerm#7392
https://docs.microsoft.com/en-us/azure/service-health/service-health-overview
https://www.terraform.io/docs/providers/azurerm/r/monitor_activity_log_alert.html
The text was updated successfully, but these errors were encountered: