💭 kv - Command | Vault | HashiCorp Developer ============================================ !https://developer.hashicorp.com/vault/docs/commands/kv Date: November 5, 2023 kv - Command | Vault | HashiCorp Developer The "kv" command groups subcommands for interacting with Vault's key/value secret engine. kv - Command | Vault | HashiCorp Developer · developer.hashicorp.com [1] hashi vault lets you manage secrets right from your cli. ``` bash # set your vault url export VAULT_ADDR=https://myvault.mydomain vault login # get a secret vault kv get secret/hvac # put a secret vault kv put -mount=secret creds passcode=my-long-passcode # get it vault kv get secret/creds # == Secret Path == # secret/data/creds # # ======= Metadata ======= # Key Value # --- ----- # created_time 2023-11-05T02:53:40.978120001Z # custom_metadata # deletion_time n/a # destroyed false # version 3 # # ====== Data ====== # Key Value # --- ----- # bar baz # passcode my-long-passcode # get one field vault kv get -field=passcode secret/creds # my-long-passcode vault kv put -mount=secret creds bar=baz # set more keys vault kv put -mount=secret creds passcode=my-long-passcode bar=baz # # == Secret Path == # secret/data/creds # # ======= Metadata ======= # Key Value # --- ----- # created_time 2023-11-05T03:24:14.65958906Z # custom_metadata # deletion_time n/a # destroyed false # version 4 vault kv get secret/creds # == Secret Path == # secret/data/creds # # ======= Metadata ======= # Key Value # --- ----- # created_time 2023-11-05T02:53:40.978120001Z # custom_metadata # deletion_time n/a # destroyed false # version 4 # # ====== Data ====== # Key Value # --- ----- # bar baz # passcode my-long-passcode ``` !!! note This post is a thought [2]. It's a short note that I make about someone else's content online #thoughts [3] References: [1]: https://developer.hashicorp.com/vault/docs/commands/kv [2]: /thoughts/ [3]: /tags/thoughts/