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