diff --git a/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/mssql_server_vulnerability_assessment.tf b/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/mssql_server_vulnerability_assessment.tf index a1c65695..439e48bd 100644 --- a/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/mssql_server_vulnerability_assessment.tf +++ b/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/mssql_server_vulnerability_assessment.tf @@ -13,6 +13,7 @@ resource "azurerm_mssql_server_security_alert_policy" "mssql_server_security_ale resource_group_name = var.resource_group_name server_name = var.server_name state = "Enabled" + email_addresses = var.alert_emails } resource "azurerm_mssql_server_vulnerability_assessment" "mssql_server_vulnerability_assessment" { diff --git a/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/variables.tf b/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/variables.tf index c3e82b78..cbd7cf8f 100644 --- a/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/variables.tf +++ b/modules/azurerm/MsSQL-Server-Vulnerability-Assessment/variables.tf @@ -52,3 +52,9 @@ variable "vulnerability_assessment_enabled" { description = "Enable vulnerability assessment for security alert policy created" type = bool } + +variable "alert_emails" { + default = [] + description = "Emails to send the alert" + type = list(string) +}