Created
May 4, 2023 20:09
-
-
Save ejhayes/93e965d4edf95f53091e5c86dcf453f8 to your computer and use it in GitHub Desktop.
Merge vault secrets and export them to 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
export $(echo PATH1 PATH2 PATH3 | xargs -n 1 -I {} vault read -format=json {} | jq -rs 'map(.data.data) | add | keys[] as $k | "\($k)=\(.[$k])"') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment