Skip to content

Commit

Permalink
Test custom payload for azure alert
Browse files Browse the repository at this point in the history
  • Loading branch information
saquino0827 committed May 7, 2024
1 parent d9ef8a8 commit 7351c4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions operations/template/alert.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "azurerm_monitor_action_group" "monitor" {
webhook_receiver {
name = "cdcti-flexion-slack-webhook-receiver"
service_uri = var.alert_slack_webhook
use_common_alert_schema = false
}
}

Expand All @@ -27,5 +28,6 @@ resource "azurerm_monitor_metric_alert" "alert" {

action {
action_group_id = azurerm_monitor_action_group.monitor.id
custom_webhook_payload = "{ \"text\" : \"Warning: ${azurerm_postgresql_flexible_server.database.id} connection has failed once in the last minute!\"}"
}
}

0 comments on commit 7351c4a

Please sign in to comment.