Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of docs/configuration: document CockroachDB HA mode into release/1.11.x #16272

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions website/content/docs/configuration/storage/cockroachdb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@ layout: docs
page_title: CockroachDB - Storage Backends - Configuration
description: >-
The CockroachDB storage backend is used to persist Vault's data in a
CockroachDB

server or cluster.
CockroachDB server or cluster.
---

# CockroachDB Storage Backend

The CockroachDB storage backend is used to persist Vault's data in a
[CockroachDB][cockroachdb] server or cluster.

- **No High Availability** – the CockroachDB storage backend does not support
high availability.
- **High Availability** – the CockroachDB storage backend supports high availability.

- **Community Supported** – the CockroachDB storage backend is supported by the
community. While it has undergone development and review by HashiCorp
Expand Down Expand Up @@ -42,14 +39,20 @@ uses that driver to interact with the database.
- `max_parallel` `(string: "128")` – Specifies the maximum number of concurrent
requests to CockroachDB.

- `ha_enabled` `(string: "true|false")` - Default not enabled.

- `ha_table` `(string: "vault_ha_locks")` - Specifies the name of the table to use
for storing high availability information.

## `cockroachdb` Examples

This example shows connecting to a PostgreSQL cluster using full SSL
verification (recommended).
This example shows connecting to a CockroachDB cluster using full SSL
verification (recommended) and high availability enabled.

```hcl
storage "cockroachdb" {
connection_url = "postgres://user:pass@localhost:5432/database?sslmode=verify-full"
connection_url = "postgres://user:pass@localhost:26257/database?sslmode=verify-full"
ha_enabled = "true"
}
```

Expand All @@ -58,7 +61,8 @@ To disable SSL verification (not recommended), replace `verify-full` with

```hcl
storage "cockroachdb" {
connection_url = "postgres://user:pass@localhost:5432/database?sslmode=disable"
connection_url = "postgres://user:pass@localhost:26257/database?sslmode=disable"
ha_enabled = "true"
}
```

Expand Down