hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.47k stars 4.56k forks source link

Cannot enable event hub as audit log destination for Azure SQL Auditing #17913

Open ammarasheikh opened 1 year ago

ammarasheikh commented 1 year ago

Is there an existing issue for this?

Community Note

Description

I am trying to set storage account and Event hub as audit log destination for Azure SQL Auditing. Only storage account gets enabled but event hub doesn't seem to be taking effect. It seems to be a limitation at the terraform azurerm provider. Once deployed the DB resource I can set it up manually from the Azure portal. Looking for this feature to be added to terraform.

image

New or Affected Resource(s)/Data Source(s)

azurerm_mssql_server_security_alert_policy

Potential Terraform Configuration

No response

References

No response

CherylFlowers commented 3 weeks ago

The azurerm_mssql_server_security_alert_policy enables Microsoft Defender for Cloud, and it appears that this feature does not have an option to send logs to an event hub.

The resources that need to be modified are azurerm_mssql_server_extended_auditing_policy and azurerm_mssql_database_extended_auditing_policy.