• Terraform Cloud
    • HCP Vault
    • HCP Consul
    • HCP Packer
    • HCP Boundary
  • Pricing
  • Documentation
  • Tutorials
  • Community
Sign InTry cloud for free
    • What is HCP?
    • HCP Account
      • AWS
      • Azure
      • Overview
        • Create and Manage HVN
        • Peering Connections
        • Transit Gateway Attachments
        • Routes
        • Security Groups
        • Create and Manage HVN
        • Peering Connections
        • Routes
        • Security Groups
      • Organizations
      • Users
      • Service Principals
        • Overview
        • Okta
        • Azure Active Directory
      • Multi-Factor Authentication
        • Overview
        • Payment
        • Flex Billing
      • Support
    • Overview
    • How HCP Boundary Works
    • Public Beta Limitations
    • Get Started
    • Boundary Documentation
    • What is HCP Consul?
    • Specifications
    • Constraints and Known Issues
      • Overview
      • Clusters
      • Clients
      • Federation
      • Upgrades
      • Audit Logs
      • Snapshots
      • Tutorials
      • Consul Documentation
      • Forums
    • Overview
    • Security Overview
    • Get Started
    • Login MFA
    • High Availability and Disaster Recovery
    • Performance Replication
    • Version Management
    • RBAC Permissions
    • Administrative Capabilities
    • Audit Log Management
      • Overview
      • FAQ
    • Metrics
    • Constraints and Known Issues
    • Migrate to HCP Vault
    • What is HCP Packer?
    • Get Started
      • Template Configuration
      • Image Metadata
      • Image Buckets
      • Image Channels and Revocation
      • Terraform Cloud Run Tasks
    • Reference Image Metadata
    • Manage Registry
    • API Reference
    • Packer Documentation
  • Glossary
  • Changelog
Type '/' to Search

»Peering Connections

You can create a peering connection between HashiCorp Cloud Platform (HCP) and your virtual network (VNet) in Azure to link resources between the two services.

»Overview

The Consul servers hosted on HCP use peering connections to communicate with the clients hosted in your Azure environment.

You can create peering connections from the HCP interface. You can also use the HCP provider in Terraform. For instructions on how to create peering connections with Terraform, refer to the HCP provider documentation.

You can use peering connections to quickly connect the HVN to your VNet. You can also create HVN peering connections across different Azure regions. However, peering connections may not scale to meet the requirements of complex environments.

»Requirements

  • An Azure account ID
  • The ID of the VNet you wish to connect
  • VNets must be configured with RFC1918 IP addresses.

»Create Peering Connections

To set up a peering connection, you need to configure the connection request in HCP and then accept the connection request in Azure.

»Configure the Connection Request in HCP

  1. Sign in to the HCP Portal and select your organization.
  2. From the sidebar, click HashiCorp Virtual Network.
  3. Click on an HVN in the ID column.
  4. From the sidebar, click Peering connections.
  5. Click Create connection.
  6. Complete the requested fields:
    • In the Connection ID field, enter a name for the peering connection.The name can be up to 36 characters and can only include letters, numbers, and dashes.
    • Enter your Azure Tenant ID.
    • Enter your Azure Subscription ID.
    • Enter your Resource group name.
    • Enter your Azure VNet name.
  7. Click Create connection.

The HVN sends a peering connection request to Azure. The peering request expires after seven days. The status of the connection appears as pending until either the request is accepted or it expires.

»Accept the Connection Request in Azure

HCP generates terminal commands that you can copy and paste into your Azure CLI to accept the request. HCP also provides links to the Azure documentation if you prefer to use the Azure browser interface.

  1. Sign in to the HCP Portal and select your organization.
  2. From the sidebar, click HashiCorp Virtual Network.
  3. Click on an HVN in the ID column.
  4. From the sidebar, click Peering connections.
  5. Click the name of the connection in the ID column.
  6. Under “Peering Instructions,” click the tab for Azure Cloud Shell.
  7. Follow the instructions to run the sequence of commands.

You can also accept the request from the Azure console. For information about accepting VNet peering connections, refer to the Azure documentation.

»Next Steps

The HVN peering connection does not contain routing information. Once the connection is active, you can add a route for all or part of the VNet CIDR range. For more details, refer to Routes.

  • Learn about HCP

    • Blog
    • Press Release
  • Resources

    • Tutorials
    • Documentation
  • Help

    • Community
    • Support
    • Contact Us
  • Terms of Service
  • SLA
  • Shared Responsibility Model
  • Privacy
  • Security
  • Press Kit
©2022 HashiCorp, Inc. All rights reserved