Review administrator emails for Azure SQL security alerts

Deliver security alerts through a channel their owners monitor.

Description

In an Azure SQL server security alert policy, email_account_admins_enabled controls email to account administrators. Other configured recipients can still receive alerts.

Potential impact

If nobody monitors the configured destinations, an enabled policy can generate alerts that go unanswered.

Remediation

Set email_account_admins_enabled = true if account administrators respond to alerts. Add any other responders to email_addresses and verify delivery.

Examples

Both examples enable the same policy and use the same storage destination. The second explicitly enables administrator email.

Before

hcl
resource "azurerm_mssql_server_security_alert_policy" "sql" {
  resource_group_name        = azurerm_resource_group.main.name
  server_name                = azurerm_mssql_server.main.name
  state                      = "Enabled"
  storage_endpoint           = azurerm_storage_account.logs.primary_blob_endpoint
  storage_account_access_key = azurerm_storage_account.logs.primary_access_key
}

After

hcl
resource "azurerm_mssql_server_security_alert_policy" "sql" {
  resource_group_name        = azurerm_resource_group.main.name
  server_name                = azurerm_mssql_server.main.name
  state                      = "Enabled"
  storage_endpoint           = azurerm_storage_account.logs.primary_blob_endpoint
  storage_account_access_key = azurerm_storage_account.logs.primary_access_key
  email_account_admins_enabled = true
}

References