hcp_consul_cluster (Resource)

Consul on Azure is available. See the Get started with end-to-end deployment configuration tutorial. The Consul cluster resource allows you to manage an HCP Consul cluster.

Example Usage

resource "hcp_hvn" "example" {
  hvn_id         = "hvn"
  cloud_provider = "aws"
  region         = "us-west-2"
  cidr_block     = "172.25.16.0/20"
}

resource "hcp_consul_cluster" "example" {
  cluster_id = "consul-cluster"
  hvn_id     = hcp_hvn.example.hvn_id
  tier       = "development"
}

Schema

Required

Optional

Read-Only

Nested Schema for ip_allowlist

Required:

Optional:

Nested Schema for timeouts

Optional:

Import

Import is supported using the following syntax:

# Using an explicit project ID, the import ID is:
# {project_id}:{cluster_id}
terraform import hcp_consul_cluster.example f709ec73-55d4-46d8-897d-816ebba28778:consul-cluster
# Using the provider-default project ID, the import ID is:
# {cluster_id}
terraform import hcp_consul_cluster.example consul-cluster