VPC peering¶
VPC peering allows you to connect two networks in different accounts or regions. This can be useful when you want to allow connectivity to resources from another account, without exposing them to public internet.
It can be established from a network in the customer account to a network where customer resources are located. Because of that, this feature is limited only to BYOA hosting model, or Service provider hosting model with "Customer Provided Networks" feature enabled. In both those cases, network is dedicated to a single customer.
The VPC peering process can only be initiated by the customer, and the owner of the cloud network needs to accept the peering request. In the case of the Service Provider hosting model, that owner is the service provider. VPC peering for BYOA can be done solely by the customer.
Warning
In order to make peering possible, CIDR blocks of source and target networks cannot overlap. This needs to be considered by the customer as they are the ones owning the source network and can also define the target network (which can either be imported existing network, created as a custom network with CIDR specified, or created as a default network by Omnistrate with default CIDR for a hosting cloud provider region).
Step by Step instruction to configure VPC peering¶
The following sections present the step-by-step guide to setting up VPC peering for AWS and GCP:
AWS¶
- Customer locates the network and collects details
- On SaaS UI, navigate to "Manage Account" -> "Custom Networks".
- Locate the custom network you plan to peer. If it's not present, then such a network doesn't support VPC peering.
- Note the following values:
- Native ID - VPC ID of the network.
- CIDR - CIDR range of the network (customer picked this value, but it can help with configuration).
- AWS Account ID - AWS account ID that hosts the network (this will be one of your accounts).
- AWS Region - AWS region of the network.
- Share these values with your customer.
- Customer uses the provided details to create a peering request. This can be done from within the AWS Console, CLI, or
API. The next steps present an example of how to configure it using AWS Console:
- In the AWS console navigate to: VPC -> Peering connections -> Create peering connection.
- Select source VPC from the current account "VPC ID (Requester)".
- Use AWS Account ID as a value for the "Another account" field.
- Use AWS Region as a value for the "Another region" field (can be skipped if the region is matching).
- Use Native ID as a value for the "VPC ID (Accepter)" field.
- Configure the route table to route traffic to peered VPC. Configuration depends on CIDR of the target network (Accepter). For details, please see AWS documentation.
- Make sure "ACLs" on your VPC will not block outbound traffic.
- Owner accepts a peering request (Service Provider or Customer, based on the hosting model)
- In AWS console navigate to: VPC -> Peering connections.
- Locate peering request.
- Accept it.
- Configure the VPC security group to allow traffic from peered VPC. For details, please see AWS documentation.
GCP¶
- Customer locates the network and collects details
- On SaaS UI, navigate to "Manage Account" -> "Custom Networks".
- Locate the custom network you plan to peer. If it's not present, then such a network doesn't support VPC peering.
- Note the following values:
- Native ID - GPC network identifier
- CIDR - CIDR range of the network (customer picked this value, but it can help with configuration)
- GCP Project ID - GCP project ID that hosts the network (this will be one of your projects)
- Share these values with your customer
- Customer uses the provided details to create a peering request. This can be done from within the GCP UI, CLI, or API.
The next steps present an example of how to configure it using GCP UI:
- On the GCP console navigate to: VPC Network -> VPC network details (of the network that will be peered) -> VPC network peering -> Add peering.
- Pick a name for the peering connection that will help you identify it.
- Select "In another project" and use GCP Project ID as a value for the "Project" field.
- Use Native ID as a value for the "VPC network name" field.
- Select "Import custom routes" and "Export custom routes".
- Owner accepts a peering request (Service Provider or Customer, based on the hosting model)
- On the GCP console navigate to: VPC Network -> VPC network details (of the Native ID network).
- You should see the peering request.
- Accept it.
- Create firewall rules to allow traffic from the peered network. For details, please see GCP documentation.
Retrieve Network Information for VPC Peering from a Deployment Instance¶
- Install the Omnistrate CLI from the here
- Identify the deployment cell associated with the deployment instance.
- Obtain network details for the deployment cell identified in the previous step.