diff --git a/website/content/api-docs/kv.mdx b/website/content/api-docs/kv.mdx index 05d0fca302..05525e8963 100644 --- a/website/content/api-docs/kv.mdx +++ b/website/content/api-docs/kv.mdx @@ -26,7 +26,7 @@ please consider using [transactions](/api/txn) instead. This endpoint returns the specified key. If no key exists at the given path, a 404 is returned instead of a 200 response. -For multi-key reads (up to a limit of 64) please consider using +For multi-key reads (up to a limit of 64 KV operations) please consider using [transactions](/api/txn) instead. | Method | Path | Produces | diff --git a/website/content/commands/kv/get.mdx b/website/content/commands/kv/get.mdx index 84f2e8b5e5..924ddf1a0f 100644 --- a/website/content/commands/kv/get.mdx +++ b/website/content/commands/kv/get.mdx @@ -12,10 +12,10 @@ store at the given key name. If no key exists with that name, an error is returned. If a key exists with that name but has no data, nothing is returned. A key name or prefix is required. --> When reading many entries under a given prefix, it may be worth considering -[`kv export`](/commands/kv/export) instead, the output of which can be used -with [`kv import`](/commands/kv/import) to move entire trees between Consul -clusters. Alternatively, the [transaction API](/api-docs/txn) provides +-> **Note**: When reading many entries under a given prefix, it may be worth +considering [`kv export`](/commands/kv/export) instead. The kv export output +can be used with [`kv import`](/commands/kv/import) to move entire trees between +Consul clusters. Alternatively, the [transaction API](/api-docs/txn) provides support for performing up to 64 KV operations atomically. ## Usage @@ -64,9 +64,9 @@ $ consul kv get redis/config/connections 5 ``` -This will return the original, raw value stored in Consul. +This will return the original raw value stored in Consul. -If the key with the given name does not exist, an error is returned: +If the key with the given name does not exist, an error is returned. ```shell-session hideClipboard $ consul kv get not-a-real-key @@ -76,7 +76,7 @@ Error! No key exists at: not-a-real-key ### Detailed Output To view detailed information about the key, specify the `-detailed` flag. -This will output all known metadata about the key including ModifyIndex +This will output all known metadata about the key including `ModifyIndex` and any user-supplied flags: ```shell-session hideClipboard @@ -102,8 +102,8 @@ redis/config/cpu:128 redis/config/memory:512 ``` -Or combine with the `-detailed` flag to list detailed information about all -entries under a prefix: +Alternatively, combine with the `-detailed` flag to list detailed information +about all entries under a prefix: ```shell-session hideClipboard $ consul kv get -recurse -detailed redis diff --git a/website/content/commands/kv/put.mdx b/website/content/commands/kv/put.mdx index d407df721e..0f89291768 100644 --- a/website/content/commands/kv/put.mdx +++ b/website/content/commands/kv/put.mdx @@ -9,7 +9,7 @@ Command: `consul kv put` The `kv put` command writes the data to the given path in the KV store. --> When writing multiple entries at once, consider using +-> **Note**: When writing multiple entries at once, consider using [`kv import`](/commands/kv/import) instead. Alternatively, the [transaction API](/api-docs/txn) provides support for performing up to 64 KV operations atomically. @@ -121,8 +121,8 @@ EOF Success! Data written to: leaderboard/scores ``` -~> For secret and sensitive values, you should consider using a secret -management solution like **[HashiCorp's Vault](https://www.vaultproject.io/)**. +~> **Warning**: For secret and sensitive values, you should consider using a +secret management solution like **[HashiCorp's Vault](https://learn.hashicorp.com/tutorials/vault/static-secrets?in=vault/secrets-management)**. While it is possible to encrpyt data before writing it to Consul's KV store, Consul provides no built-in support for encryption at-rest. @@ -142,7 +142,7 @@ $ consul kv put -cas -modify-index=456 redis/config/connections 10 Success! Data written to: redis/config/connections ``` -### Locking Primatives +### Locking Primitives To create or tune a lock, use the `-acquire` and `-session` flags. The session must already exist (this command will not create it or manage it):