# PostgreSQL Flexible Server

## Prerequisites

### Create a PostgreSQL Flexible Server subnet in the Infrastructure

1. Navigate to **Administrator** -> **Infrastructure** from the DuploCloud Portal.
2. From the **NAME** column, select the Infrastructure.
3. Select the **Subnets** tab, and click **Add**. The **Add Subnet** pane displays.

<div align="left"><figure><img src="/files/HBFCdQBqcm3D8BZaEpdY" alt=""><figcaption><p>The <strong>Add Subnet</strong> pane in the DuploCloud Portal</p></figcaption></figure></div>

4. Enter a name for the subnet in the **Name** field.
5. Enter the **Address Prefix** for the subnet.
6. From the **Type** list box, select **PostgreSQL Flexi Server**.
7. In the **Isolated Network** list box, select **Yes** or **No**.
8. Select the appropriate endpoints from the **Service Endpoints** list box.
9. Click **Add**. The subnet is added.

<div align="left"><figure><img src="/files/qJ7XKUuk6IexXqfRLUpM" alt=""><figcaption></figcaption></figure></div>

## Creating a PostgreSQL Flexible Server database

1. From the DuploCloud Portal, navigate to **Cloud Services** -> **Database** -> **PostgreSQL Flexible**.
2. Click **Add**. The **Create PostgreSQL Flexible Instance** page displays.<br>

   <figure><img src="/files/5nUbwo2WR0OWbviLNrQg" alt=""><figcaption><p>The <strong>Create PostgreSQL Flexible Instance</strong> page</p></figcaption></figure>
3. Complete the required fields.
4. From the **Subnet** list box, select the **PostgreSQL Flexi Server** subnet previously created.
5. Click **Submit**. The PostgreSQL Flexible Server database is created.

## Viewing a PostgreSQL Flexible Server database

From the DuploCloud Portal, navigate to **Cloud Services** -> **Databases** -> **PostgreSQL Flexible**, and click on the PostgreSQL Flexible Server database in the **NAME** column. Use the **Overview** and **Details** tabs to view database info.


---

# Agent Instructions: 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:

```
GET https://docs.duplocloud.com/docs/automation-platform/overview-2/azure-services/databases/postgresql-flexible-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
