Created
June 18, 2019 17:41
-
-
Save cfraizer/660633362006af2233ae2f1adf8ebf78 to your computer and use it in GitHub Desktop.
Using vault and jq to put secrets into environment variables:
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 kv get --format=json «path/to/secrets» | jq -r '.data.data | to_entries[] | "export \(.key)=\(@sh "\(.value)")"' | |
⋮ | |
export AWS_REGION='us-west-2' | |
export CATEGORYUPDATEWORKER_POOLSIZE='10' | |
export DOMAINUPDATEWORKER_POOLSIZE='10' | |
⋮ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment