Skip to content

Instantly share code, notes, and snippets.

@joemiller
Created April 5, 2022 23:41
Show Gist options
  • Select an option

  • Save joemiller/4c4e22c0795134c5ad7088bc822ae82c to your computer and use it in GitHub Desktop.

Select an option

Save joemiller/4c4e22c0795134c5ad7088bc822ae82c to your computer and use it in GitHub Desktop.

Revisions

  1. joemiller created this gist Apr 5, 2022.
    21 changes: 21 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    $ 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