For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform-azure-sql-database-audit-disabled.md.
A documentation index is available at /llms.txt.
Enabling Threat Detection for Azure SQL Database helps identify anomalous activities and potential security threats by alerting administrators when suspicious activity is detected. If the threat_detection_policy block is set to state = "Disabled" or omitted entirely, as in the following configuration, threat detection will not be active:
threat_detection_policy {
state = "Disabled"
}
This increases the risk that unusual access patterns or potential SQL injection attacks go unnoticed, potentially leading to data breaches or data loss. To secure your deployment, configure the threat_detection_policy block as follows:
threat_detection_policy {
state = "Enabled"
}
If left unaddressed, disabling this feature may allow attackers to exploit vulnerabilities in your database environment undetected.