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-mysql-server-public-access-enabled.md.
A documentation index is available at /llms.txt.
This check verifies if the Azure MySQL Server has public network access enabled, which allows connections from the internet to reach your database. When public network access is enabled, your database is accessible to anyone who has the connection information, creating a significant security risk. Properly secured MySQL servers should have public_network_access_enabled set to false, forcing all connections to be made through private endpoints or service endpoints. The following example shows a secure configuration:
resource "azurerm_mysql_server" "example" {
// ... other configuration ...
public_network_access_enabled = false
// ... other configuration ...
}