Created
April 5, 2022 23:41
-
-
Save joemiller/4c4e22c0795134c5ad7088bc822ae82c to your computer and use it in GitHub Desktop.
vault kv allows for a key to both contain data and have subkeys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vault server -dev -dev-root-token-id=root & | |
$ VAULT_ADDR='http://127.0.0.1:8200' VAULT_TOKEN=root vault kv put secret/foo bar=baz quux=blah | |
$ VAULT_ADDR='http://127.0.0.1:8200' VAULT_TOKEN=root vault kv put secret/foo/subkey blah=blah | |
$ VAULT_ADDR='http://127.0.0.1:8200' VAULT_TOKEN=root vault kv list secret/ | |
Keys | |
---- | |
foo | |
foo/ | |
$ VAULT_ADDR='http://127.0.0.1:8200' VAULT_TOKEN=root vault kv get secret/foo | |
Key Value | |
--- ----- | |
bar baz | |
quux blah | |
$ VAULT_ADDR='http://127.0.0.1:8200' VAULT_TOKEN=root vault kv get secret/foo/subkey | |
Key Value | |
--- ----- | |
blah blah |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment