# Virtual Private Cloud (VPC) Peering

Virtual Private Cloud (VPC) peering establishes a direct networking connection between two VPCs, allowing traffic to flow seamlessly between them. With VPC peering, resources in the connected VPCs can communicate as though they are part of the same network, even if the VPCs reside in different regions (referred to as Inter-Region VPC peering).

This connection is ideal for facilitating data transfer between environments. For instance, if you manage multiple GCP projects, you can peer the VPCs across those projects to enable secure communication and resource sharing, such as setting up a file-sharing network.

## Setting Up VPC Peering in DuploCloud

To set up VPC peering in DuploCloud, first configure peering in the source Infrastructure, then confirm peering in the destination Infrastructure.

### Configure peering in the source Infrastructure

1. In the DuploCloud Portal, navigate to **Administrator** -> **Infrastructure**.
2. In the **NAME** column, select the name of the source Infrastructure.
3. Select the **Peering** tab.
4. Click **Add**. The **Create VPC Peering** pane displays.<br>

   <div align="left"><figure><img src="/files/LQlGPCBElp2HlTvYNTo8" alt="" width="388"><figcaption><p>The <strong>Create VPC Peering</strong> pane</p></figcaption></figure></div>
5. Select the **Destination Infrastructure**.
6. Optionally, enable **Bi-Direction/Duplex Peering**, **Export Custom Routes**, **Import Custom Routes**, **Export Subnets Routes With Public IP**, or **Import Subnet Routes With Public IP**. Complete additional fields/selections as required.
7. Click **Create**. VPC peering is configured.

### Confirm peering in the destination Infrastructure

1. In the DuploCloud Portal, navigate to **Administrator** -> **Infrastructure**.
2. In the **NAME** column, select the name of the destination Infrastructure.
3. Select the **Peering** tab.
4. In the row of the peering connection, click the menu icon (<img src="/files/EE6TjxN40bDN0DLs8xz6" alt="" data-size="line">).
5. Select **Edit**. The **Update VPC Peering** pane displays.
6. Click **Update**. Verify that the peering status is **Active**.

<figure><img src="/files/fTYduX9l8ryXBel1rMjh" alt=""><figcaption></figcaption></figure>


---

# 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-1/gcp-services/virtual-private-cloud-vpc-peering.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.
