> ## Documentation Index
> Fetch the complete documentation index at: https://qovery-feat-cpu-limit-disable-override.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VPC Peering

> How to peer a Qovery VPC with an existing VPC on AWS

## Overview

This guide shows you how to set up VPC peering between a Qovery-managed cluster VPC and an existing VPC in your AWS account.

## Goal

Connect an existing VPC on AWS accounts with the Qovery managed cluster VPC to deploy applications using resources like PostgreSQL RDS instances in the existing VPC.

## Prerequisites

* An existing AWS VPC with accessible resources (e.g., RDS database)
* A Qovery cluster already deployed on your AWS account
* Non-overlapping CIDR blocks between VPCs

<Warning>
  Make sure the CIDR blocks of your two VPCs don't overlap.
</Warning>

<Info>
  You can customize the Qovery CIDR during cluster creation.
</Info>

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/custom-cidr.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=699d880818c442b8833eb5b3b9b834c8" alt="Customize Qovery CIDR" width="2784" height="1830" data-path="images/aws-vpc-peering-with-qovery/custom-cidr.png" />

## Step 1. Gather the necessary information

You need to collect the following information:

| Information              | Description                     | Example              |
| ------------------------ | ------------------------------- | -------------------- |
| **VPC Source CIDR**      | CIDR block of your existing VPC | 10.0.0.0/16          |
| **VPC Source ID**        | VPC ID of your existing VPC     | vpc-0abc123def456789 |
| **VPC Destination CIDR** | CIDR block of Qovery VPC        | 10.1.0.0/16          |
| **VPC Destination ID**   | VPC ID of Qovery VPC            | vpc-0xyz789abc123456 |

### Find your existing VPC ID

In the AWS Console, go to **VPC** → **Your VPCs**

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/vpc-console-1.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=7678fdaac34bc4682e661ac7c54b1fa5" alt="AWS console VPC list" width="963" height="413" data-path="images/aws-vpc-peering-with-qovery/vpc-console-1.png" />

### Find the CIDR ranges

Make sure the CIDR blocks don't overlap.

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/find-cidr.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=bff44f017e392d14893998da551192f0" alt="AWS console VPC CIDR ranges" width="501" height="397" data-path="images/aws-vpc-peering-with-qovery/find-cidr.png" />

## Step 2. Create a peering connection

In the AWS Console:

1. Go to **VPC** → **Peering connections**
2. Click **Create peering connection**
3. Configure the peering connection:
   * **Peering connection name**: Give it a descriptive name
   * **VPC (Requester)**: Select your **Qovery VPC**
   * **Account**: Select **My account**
   * **Region**: Select **This region**
   * **VPC (Accepter)**: Select your **existing VPC**
4. Click **Create peering connection**

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/peering-form.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=70c3813ea0dd712236de751993fba8b8" alt="AWS create VPC peering form" width="732" height="1148" data-path="images/aws-vpc-peering-with-qovery/peering-form.png" />

## Step 3. Accept the peering request

1. In the Peering connections list, find your newly created peering connection
2. Select the peering connection
3. Click **Actions** → **Accept request**

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/accept-peering-request.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=a8637f6a0de05dbec944c498bca7af58" alt="AWS accept VPC peering request" width="1920" height="196" data-path="images/aws-vpc-peering-with-qovery/accept-peering-request.png" />

4. Confirm by clicking **Accept request**

The peering connection status should change to **Active**.

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/peering-active.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=9cb30ec5180779b0254d8e9b919fc376" alt="AWS VPC peering active" width="1589" height="68" data-path="images/aws-vpc-peering-with-qovery/peering-active.png" />

Note down the **Peering connection ID** (e.g., `pcx-0abc123def456789`) - you'll need it for the next steps.

## Step 4. Update existing VPC route table

Now you need to add a route in your existing VPC's route table.

1. Go to **VPC** → **Route Tables**
2. Find and select the route table associated with your **existing VPC**
3. Click the **Routes** tab
4. Click **Edit routes**
5. Click **Add route**
6. Configure the new route:
   * **Destination**: Enter the **Qovery VPC CIDR** (e.g., `10.1.0.0/16`)
   * **Target**: Select **Peering Connection**, then select your peering connection
7. Click **Save changes**

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/existing-rt.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=df40e8855be931e3f5e2740bd83c907d" alt="AWS VPC Qovery Route Table" width="1365" height="247" data-path="images/aws-vpc-peering-with-qovery/existing-rt.png" />

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/existing-rt-add.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=a3df958a29627bd5779aefdf80402ee7" alt="AWS VPC Qovery Route Table add route" width="1656" height="281" data-path="images/aws-vpc-peering-with-qovery/existing-rt-add.png" />

<Warning>
  Do not edit or remove existing routes to avoid service interruption.
</Warning>

## Step 5. Update Qovery VPC route table

Add a route in the Qovery VPC through the Qovery Console.

1. Navigate to [Qovery Console](https://console.qovery.com)
2. Select your **Organization**
3. Go to **Clusters**
4. Select the cluster connected to the VPC you want to peer
5. Click on the **Settings** tab
6. Navigate to the **Network** section
7. Add a new route:
   * **Destination**: Enter your **existing VPC CIDR** (e.g., `10.0.0.0/16`)
   * **Target**: Enter your **peering connection ID** (e.g., `pcx-0abc123def456789`)
   * **Description**: Add a description like "Peering to existing VPC"
8. Click **Save**

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/qovery-rt.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=5b84b1cae75e620fb78f319df1111bfb" alt="AWS VPC Qovery Route Table add route" width="2784" height="1830" data-path="images/aws-vpc-peering-with-qovery/qovery-rt.png" />

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/qovery-rt-added.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=5ee57e673376fee624e07e6cf1bf7b05" alt="AWS VPC Qovery Route Table add route" width="2784" height="1830" data-path="images/aws-vpc-peering-with-qovery/qovery-rt-added.png" />

<Warning>
  Do not alter existing routes.
</Warning>

## Step 6. Update the security groups

Update the security groups to allow traffic between the two VPCs.

1. Go to **VPC** → **Security Groups**
2. Find the security group associated with the resources you want to access from Qovery (e.g., RDS database security group)
3. Click the **Inbound rules** tab
4. Click **Edit inbound rules**
5. Click **Add rule**
6. Configure the rule based on your needs

**Example for PostgreSQL database:**

* **Type**: PostgreSQL
* **Port range**: 5432
* **Source**: Enter the **Qovery VPC CIDR** (e.g., `10.1.0.0/16`)
* **Description**: "Access from Qovery VPC"

7. Click **Save rules**

<img src="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/X_r5UUC0e-nzkGnA/images/aws-vpc-peering-with-qovery/pg-inbound-rule.png?fit=max&auto=format&n=X_r5UUC0e-nzkGnA&q=85&s=3f9d0697103614e46fd1ae2bfb02523e" alt="AWS Security Group inbound rules" width="1759" height="510" data-path="images/aws-vpc-peering-with-qovery/pg-inbound-rule.png" />

## Step 7. Deploy an application

Deploy an application in your Qovery environment that connects to a resource in your existing VPC.

Make sure your application is configured with the correct connection details to access resources in the peered VPC.

## Next Steps

<CardGroup cols={2}>
  <Card title="AWS VPC Peering Docs" icon="https://mintcdn.com/qovery-feat-cpu-limit-disable-override/e6cBDl_nVcx7pCov/images/logos/cloud-providers/aws-icon.svg?fit=max&auto=format&n=e6cBDl_nVcx7pCov&q=85&s=f8fd5a1939f750a0d9da066a133679bb" href="https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html" width="24" height="24" data-path="images/logos/cloud-providers/aws-icon.svg">
    Official AWS VPC peering documentation
  </Card>

  <Card title="Deploy Your First App" icon="rocket" href="/getting-started/guides/getting-started/deploy-your-first-application">
    Deploy your first application on Qovery
  </Card>

  <Card title="Cluster Configuration" icon="gear" href="/configuration/clusters">
    Learn about cluster configuration
  </Card>

  <Card title="Security Overview" icon="shield" href="/getting-started/security-and-compliance/overview">
    Security and compliance
  </Card>
</CardGroup>
