# VPC Peering Connections
VPC peering connection is a network connection between two VPCs. Through this connection, the instances in different VPCs can communicate with each other as if they are in the same network.
# Precautions
- EMQX Cloud only supports creating peering connection at the same region.
- EMQX Cloud does not accept CIDR in the range of 10.11.1.0/24 ~ 10.64.255.0/24.
- Peering connections are bound to resources. Please create peering connections before creating resources.
# AWS Cloud VPC Peering Connection
# Creating peering connection
Log in to EMQX Cloud console (opens new window), go to the deployment details page, click the
+ VPC Peering Connection
button, and recordRegion of deployment
,VPC ID of deployment
,CIDR of deployment
,Account ID of EMQX Cloud
in the pop-up dialog box, which need to be used later. Please don’t close this dialog boxLog in to the Amazon Web Services console, switch to the region where
Region of deployment
is recorded in step 1, go toNetworking & Content Delivery
->VPC
->Peering Connection
, and click the button ofCreate Peering Connection
- Select
Another account
ofAccount
,Account ID
, fill in theAccount ID of EMQX Cloud
recorded in step 1 - Select
This region(us-east-1)
ofRegion
- For VPC (Accepter), fill in the
VPC ID of deployment
in step 1.
After filling in all the information, click the button of
Create Peering Connection
- Select
Once created, the following will be displayed. Please record
Requester VPC owner
,Requester VPC ID
,VPC Peering Connection
, which need to be used laterReturn to EMQX Cloud console (opens new window), fill in the information recorded in step 3, and click the
Confirm
button to complete the creation of the peering connection- For Peering ID, fill in the recorded
VPC Peering Connection
- For Account ID, fill in the recorded
Requester VPC owner
- For VPC ID, fill in the recorded
Requester VPC ID
- For Peering ID, fill in the recorded
Return to Amazon Web Services console, go to
Networking & Content Delivery
->VPC
->Route Tables
, add theCIDR of deployment
recorded in step 1 to the route table of the corresponding VPCGo to
Networking & Content Delivery
->VPC
->Security Groups
,configure the security group bound to the corresponding VPC, edit inbound rules and add a rule
# Delete peering connections
To delete a peering connection, you need to ensure that the status of peering connection is running
Tip
Before deleting the peering connection, please make sure that there are no associated resources in the deployment, otherwise there will be unpredictable risks
Go to deployment details
Click the
delete button
on the right side of the peering connection
# Azure VPC Peering Connection
This feature is now not available. If you need to set up VPC peering connection with Azure, please submit tickets to contact us.
# GCP VPC Peering Connection
# Creating peering connection
Log in to EMQX Cloud console (opens new window), go to the deployment details page, click the
+ VPC Peering Connection
button, fill in the information- Project ID: GCP Project ID of your peering VPC
- VPC ID: Name of your peering VPC
and record the information below:
- VPC ID of deployment
- CIDR of deployment
- Project ID of EMQX Cloud
Log in to your GCP console, create the peering connection
- In the Google Cloud Console, click VPC network peering.
- Click CREATE PEERING CONNECTION, and click Continue
- In Name, enter a name for your peering connection.
- In Your VPC Network, enter the name of your GCP VPC network.
- In Peered VPC network, select In another project.
- In Project ID, enter EMQX Cloud Project ID. You can find this name in the VPC Peering view in EMQX Cloud.
- In VPC network name, enter your EMQX Cloud VPC Name. You can find this name in the VPC Peering view in EMQX Cloud.
- Click CREATE.
You will see the status of peering connection is Active if succeeded.
and you will see the status of VPC Peering on EMQX Cloud is running.
Create firewall to allow your EMQX CLoud deployment to access your GCP network
- Click Firewall, and Click CREATE FIREWALL RULE.
- In Network, select your GCP network
- In Targets, select All instances in the network, or you can select other option according to your situation.
- In Source IP ranges, fill in the CIDR of deployment in step 1
- Seletc your Protocols and ports.
# Delete peering connections
To delete a peering connection, you need to ensure that the status of peering connection is running
Tip
Before deleting the peering connection, please make sure that there is no associated resources in the deployment, otherwise there will be unpredictable risks
Go to deployment details
Click the
delete button
on the right side of the peering connection
# Confluent Cloud Peering Connection
After the Confluent Cloud cluster has been created, we could add peering by the following steps:
Go to the
Networking
section of theCluster settings
page and click on theAdd Peering
button.Fill in the vpc information. (You could get the information from
VPC Peering
section of the deployment console)When the connection status is
Inactive
, go back to the deployment console to accept the peering request. Fill in the vpc information of the confluent cloud cluster and clickConfirm
. When the vpc status turns torunning
, you successfully create the vpc peering connection.
# Timescale Cloud Peering Connection
If you don't have a VPC for your timescale cloud project, you could log in to the timescale cloud and create a new VPC.
When the VPC is created, you are ready to create the VPC peering connection. Click on the VPC to go to the vpc peering page. Enter the EMQX Cloud deployment's vpc information to start the vpc peering process. You could find the deployment's vpc information in the EMQX Cloud console, VPC peering section.
When the peering connection state turns to Pending peer
:
go to the EMQX Cloud console to accept the peering request by filling the timescale cloud vpc information
Click on Confirm
to finish the creation. When the status turns to runninng
, you are successfully created the vpc peering connection!