Write new key/value data
Write new versions of data to a new or existing data path in the kv
v2 plugin.
Assumptions
- You have set up a
kv
v2 plugin. - Your authentication token has
create
andupdate
permissions for thekv
v2 plugin.
Note
The Vault CLI forcibly converts kv
keys and values data to strings before
writing data. To preserve non-string data, write your key/value pairs to Vault
from a JSON file or use the plugin API.
Use vault kv put
to save a new version of
key/value data to an new or existing secret path:
For example: