Before you can peer with a GCP application VPC, you must have created at least one VPC in Yugabyte Cloud that uses GCP.
You need the following details for the GCP application VPC you are peering with:
- GCP project ID
- VPC name
- VPC CIDR address
To obtain these details, navigate to your GCP VPC networks page.
To create a peering connection, do the following:
- On the Network Access page, select VPC Network, then Peering Connections.
- Click Add Peering Connection to display the Create Peering sheet.
- Enter a name for the peering connection.
- Choose GCP.
- Choose the Yugabyte Cloud VPC. Only VPCs that use GCP are listed.
- Enter the GCP Project ID, application VPC network name, and, optionally, VPC CIDR address.
- Click Initiate Peering.
The peering connection is created with a status of Pending. To complete the peering, you must create a peering connection in GCP.
Create a peering connection in GCP
To complete a Pending peering connection, you need to sign in to GCP and create a peering connection.
You'll need the the Project ID and VPC network name of the Yugabyte Cloud VPC you are peering with. You can view and copy these details in the VPC Details sheet on the VPCs page or the Peering Details sheet on the Peering Connections page.
In the Google Cloud Console, do the following:
Under VPC network, select VPC network peering and click Create Peering Connection.
Click Continue to display the Create peering connection details.
Enter a name for the GCP peering connection.
Select your VPC network name.
Select In another project and enter the Project ID and VPC network name of the Yugabyte Cloud VPC you are peering with.
When finished, the status of the peering connection in Yugabyte Cloud changes to Active if the connection is successful.
For information on VPC network peering in GCP, refer to VPC Network Peering overview in the Google VPC documentation.