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.
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"
}
cluster_id
(String) The ID of the HCP Consul cluster.hvn_id
(String) The ID of the HVN this HCP Consul cluster is associated to.tier
(String) The tier that the HCP Consul cluster will be provisioned as. Only development
, standard
, plus
, and premium
are available at this time. See pricing information.auto_hvn_to_hvn_peering
(Boolean) Enables automatic HVN to HVN peering when creating a secondary cluster in a federation. The alternative to using the auto-accept feature is to create an hcp_hvn_peering_connection
resource that explicitly defines the HVN resources that are allowed to communicate with each other.connect_enabled
(Boolean) Denotes the Consul connect feature should be enabled for this cluster. Default to true.datacenter
(String) The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id
.ip_allowlist
(Block List, Max: 3) Allowed IPV4 address ranges (CIDRs) for inbound traffic. Each entry must be a unique CIDR. Maximum 3 CIDRS supported at this time. (see below for nested schema)min_consul_version
(String) The minimum Consul patch version of the cluster. Allows only the rightmost version component to increment (E.g: 1.13.0
will allow installation of 1.13.2
and 1.13.3
etc., but not 1.14.0
). If not specified, it is defaulted to the version that is currently recommended by HCP.primary_link
(String) The self_link
of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.project_id
(String) The ID of the HCP project where the HCP Consul cluster is located.
If not specified, the project specified in the HCP Provider config block will be used, if configured.
If a project is not configured in the HCP Provider config block, the oldest project in the organization will be used.public_endpoint
(Boolean) Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.size
(String) The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small
. Valid options for other tiers - small
, medium
, large
. For more details - https://cloud.hashicorp.com/pricing/consul. Upgrading the size of a cluster after creation is allowed.timeouts
(Block, Optional) (see below for nested schema)cloud_provider
(String) The provider where the HCP Consul cluster is located.consul_automatic_upgrades
(Boolean) Denotes that automatic Consul upgrades are enabled.consul_ca_file
(String) The cluster CA file encoded as a Base64 string.consul_config_file
(String) The cluster config encoded as a Base64 string.consul_private_endpoint_url
(String) The private URL for the Consul UI.consul_public_endpoint_url
(String) The public URL for the Consul UI. This will be empty if public_endpoint
is false
.consul_root_token_accessor_id
(String) The accessor ID of the root ACL token that is generated upon cluster creation.consul_root_token_secret_id
(String, Sensitive) The secret ID of the root ACL token that is generated upon cluster creation.consul_snapshot_interval
(String) The Consul snapshot interval.consul_snapshot_retention
(String) The retention policy for Consul snapshots.consul_version
(String) The Consul version of the cluster.id
(String) The ID of this resource.organization_id
(String) The ID of the organization this HCP Consul cluster is located in.region
(String) The region where the HCP Consul cluster is located.scale
(Number) The number of Consul server nodes in the cluster.self_link
(String) A unique URL identifying the HCP Consul cluster.state
(String) The state of the HCP Consul cluster.ip_allowlist
Required:
address
(String) IP address range in CIDR notation.Optional:
description
(String) Description to help identify source (maximum 255 chars).timeouts
Optional:
create
(String)default
(String)delete
(String)update
(String)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