Ensure 'public network access enabled' is set to False for mySQL servers

Error: public network access enabled' is not set to 'False' for mySQL servers

Bridgecrew Policy ID: BC_AZR_NETWORKING_45
Checkov Check ID: CKV_AZURE_53
Severity: LOW

public network access enabled' is not set to 'False' for mySQL servers

Description

By disabling public network access and only allowing connections from trusted IP addresses or networks, you can help to mitigate these risks and ensure that only authorized users and systems are able to connect to the MySQL server. This can help to protect the server and its data from unauthorized access or attacks, and can help to maintain the confidentiality, integrity, and availability of the server and its resources.

Fix - Buildtime

Terraform

  • Resource: azurerm_mysql_server
  • Argument: public_network_access_enabled
resource "azurerm_mysql_server" "examplea" {
  ...
+ public_network_access_enabled = false
}