A new platform for documentation and tutorials is launching soon.
We are migrating HCP documentation into HashiCorp Developer, our new developer experience.
This topic describes how to federate Consul clusters in HCP.
Consul datacenter federation enables operators to extend their Consul environments by connecting multiple HashiCorp Cloud Platform (HCP) Consul clusters together within a region. Federation lowers the operational overhead of connecting applications across distinct regions and improves security. Server-to-server connectivity is automatically handled by the HCP platform.
- Clusters within the HashiCorp virtual network (HVN) must have distinct network CIDR blocks to be federated.
- Only one cluster can be designated as the primary cluster. Clusters that you intend to designate as secondary must be added through federation.
- Standalone clusters cannot be added to an existing federation.
- By default, six Consul clusters are allowed in an HCP organization. As a result, one primary cluster and five secondary clusters are supported. You can request a higher limit by filing a support ticket.
Each Consul tier supports federation according to where the resources are located. Intra regional federation is when all resources are located within the same cloud provider region. Inter federation is when the resources are located across the different cloud provider regions. The following table describes the federation options for different HCP Consul tiers.
|Development||Intra regional |
|Plus||Intra (must be federated with another plus tier cluster) |
- If you have not already done so, log into the HashiCorp Cloud Platform and click Consul under the Services sidebar menu.
- Either create a cluster or click on an existing cluster that you want to designate as the primary.
- Click Federation in the sidebar menu and click Create secondary.
- Configure the secondary cluster and click Create secondary. Refer to Create a Consul Cluster for information about cluster configuration options.
- Repeat the procedure to create additional subordinate clusters.
Tutorial: Complete the Federate Multiple HCP Consul clusters tutorial for additional guidance on enabling HCP Consul federation.