> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/public-exposure/appsec2-azure-44.md).

# Azure Database for MySQL server not configured with private endpoint misconfiguration detected in co

## Rule Details

|                        |                                      |
| ---------------------- | ------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC2\_AZURE\_44                   |
| Category - Subcategory | Public Exposure - VPC VCN VNet       |
| Provider               | AZURE                                |
| Severity               | MEDIUM                               |
| Framework              | Terraform, Terraform Plan            |
| Mapped CSPM/KSPM Rule  | bd6e2410-2f98-4d6d-a24d-7484c0407113 |

## Impact

This rule checks whether Azure MySQL database servers are configured with private endpoints. Private endpoint connections are essential for ensuring secure communication, establishing exclusive, private connectivity to Azure Database for MySQL. Configuring a private endpoint ensures access only from recognized networks, preventing entry from potentially malicious or unknown IP addresses, including those within Azure. It is recommended to establish a private endpoint to enhance the security of communication for your Azure MySQL database.

## How to Fix

*Resource:* azurerm\_mysql\_server, azurerm\_private\_endpoint

* *Arguments:* private\_connection\_resource\_id

To fix this issue and establish secure communication with your network, configure your Azure MySQL server with a private endpoint.

## This code enhances Azure MySQL server security by enabling a private endpoint connection. The private endpoint allows secure connections between your virtual network and the service, traversing exclusively over the Azure network. This prevents exposure to the public internet, and helps to reduce the threat of data leakage and external threats. \[source,go]

resource "azurerm\_mysql\_server" "example" { name = "example-mysql-server" //... }

resource "azurerm\_private\_endpoint" "example" { name = "example-private-endpoint" location = azurerm\_resource\_group.example.location resource\_group\_name = azurerm\_resource\_group.example.name subnet\_id = azurerm\_subnet.example.id

## private\_service\_connection { name = "example-privateserviceconnection" private\_connection\_resource\_id = azurerm\_mysql\_server.example.id subresource\_name = "mysqlServer" is\_manual\_connection = false } }


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/public-exposure/appsec2-azure-44.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
