hcp_vault_cluster (Resource)

The Vault cluster resource allows you to manage an HCP Vault 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_vault_cluster" "example" {
  cluster_id = "vault-cluster"
  hvn_id     = hcp_hvn.example.hvn_id
  tier       = "standard_large"
  metrics_config {
    datadog_api_key = "test_datadog"
    datadog_region  = "us1"
  }
  audit_log_config {
    datadog_api_key = "test_datadog"
    datadog_region  = "us1"
  }
  lifecycle {
    prevent_destroy = true
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for audit_log_config

Optional:

Read-Only:

Nested Schema for ip_allowlist

Required:

Optional:

Nested Schema for major_version_upgrade_config

Required:

Optional:

Nested Schema for metrics_config

Optional:

Read-Only:

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_vault_cluster.example f709ec73-55d4-46d8-897d-816ebba28778:vault-cluster
# Using the provider-default project ID, the import ID is:
# {cluster_id}
terraform import hcp_vault_cluster.example vault-cluster

Tutorials

Refer to the following tutorials for additional usage examples: