HashiCorp Cloud Platform
Peering connections
You can create a peering connection between HashiCorp Cloud Platform (HCP) and your virtual private cloud (VPC) in AWS to allow traffic between services.
Overview
HCP Consul Dedicated and HCP Vault Dedicated uses a peering connections to communicate with the clients hosted in your AWS environment.
You can create a peering connections from the HCP Portal or the HCP provider in Terraform. For instructions on how to create peering connections with Terraform, refer to the HCP provider documentation.
For larger environments, we recommend connecting HCP to your VPCs through a transit gateway.
Requirements
- An AWS account ID
- The ID of the VPC you wish to connect
- VPCs must be configured with RFC1918 or RFC6598 specification IP addresses.
Create peering connections
There are two methods to create a peering connection between the HCP HVN and AWS VPC - manual or automated.
The automated method connects to your AWS account and launches a CloudFormation template to complete the peering configuration. The CloudFormation template handles creating the peering request, accepting the peering request, and creating the necessary routes between the HVN and VPC.
The manual process will require you to perform each step in your HCP and AWS accounts.
Click HashiCorp Virtual Network in the left navigation menu.
Select the HVN you want to create a peering connection with.
In the selected HVN overview page, click Peering connections. If you have peering connections available, they are listed in the center of the screen.
Click Create connection.
Select the Quick peering with quick-create links radio button.
Select the VPC region you want to create the peering connection in and click Launch stack creation in AWS CloudFormation.
A new browser tab/page will open. If you are not already authenticated, log into your AWS account.
In the Parameters section, select the VPC you wish to peer with your HCP HVN.
Click the I acknowledge that AWS CloudFormation might create IAM resources checkbox and click Create stack.
Monitor the progress until the status changes to CREATE_COMPLETE.
Return to the HCP Portal and click Peering connections in the left navigation menu. The new peering connection is listed.
Click Route table in the left navigation menu. In addition to creating, and accepting the peering connection, the automated process also handled route creation to allow traffic between your HCP HVN and AWS VPC.
Note
You can delete all resources created by the CloudFormation template by deleting the stack in AWS.