> 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-43.md).

# Azure Database for MariaDB not configured with private endpoint misconfiguration detected in code

## Rule Details

|                        |                                      |
| ---------------------- | ------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC2\_AZURE\_43                   |
| Category - Subcategory | Public Exposure - VPC VCN VNet       |
| Provider               | AZURE                                |
| Severity               | MEDIUM                               |
| Framework              | Terraform, Terraform Plan            |
| Mapped CSPM/KSPM Rule  | d22487ed-9b42-451d-9321-d8471e2e46c3 |

## Impact

This rule checks whether Azure MariaDB database servers are configured with private endpoints. Private endpoint connections are essential for ensuring secure communication, establishing exclusive, private connectivity to Azure Database for MariaDB. 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 MariaDB database.

## How to Fix

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

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

To fix this issue and establish secure communication with your network, configure your Azure MariaDB server with a private endpoint, by adding a private\_connection\_resource\_id connection to the azurerm\_mariadb\_server service.

## This code enhances Azure MariaDB server security by enabling a private endpoint connection. The private endpoint allows secure connections from clients in the same Azure virtual network or peered virtual networks. This control over access to the MariaDB server prevents exposure to the public internet, helping to reduce the threat of data leakage and external threats. \[source,go]

resource "azurerm\_mariadb\_server" "example" { ... }

resource "azurerm\_private\_endpoint" "example" { ...

## private\_service\_connection { ... private\_connection\_resource\_id = azurerm\_mariadb\_server.pass.id ... } }


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
