Skip to content

easiest tool to use to convert vault secrets to environment variables

Notifications You must be signed in to change notification settings

james-lawrence/vaultenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vaultenv

an opinionated and simple secrets to environment variable tool

the rules

  • only works with kv secret backend.
  • obey standard vault environment variable settings. (VAULT_ADDR, VAULT_TOKEN, etc)
  • all secrets must be valid environment key/value pairs. no additional translation is done.
  • kv pairs are merged left to right. left most kv pairs are the environment of vaultenv itself.
  • always uses the latest version of a secret.

installation

go get -u github.com/james-lawrence/vaultenv

command flags/options

vaultenv --help

quick start examples

assuming you've logged in to vault.

# given the following secrets
# runtime environment:
# PATH=/usr/bin
# FOO=bar1
# secret/key1:
# FOO=bar2
# BIZZ=BAZZ
# secret/key2:
# FOO=bar3
# HELLO=world
vaultenv secret/key1 secret/key2
# output:
# PATH=/usr/bin
# FOO=bar3
# BIZZ=BAZZ
# HELLO=world
# given the following secrets
# runtime environment:
# PATH=/usr/bin
# FOO=bar1
# secret/key1:
# FOO=bar2
# BIZZ=BAZZ
# secret/key2:
# FOO=bar3
# HELLO=world
vaultenv --clean secret/key1 secret/key2
# output:
# FOO=bar3
# BIZZ=BAZZ
# HELLO=world

About

easiest tool to use to convert vault secrets to environment variables

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages