Skip to content

Instantly share code, notes, and snippets.

@ejhayes
Created May 4, 2023 20:09
Show Gist options
  • Save ejhayes/93e965d4edf95f53091e5c86dcf453f8 to your computer and use it in GitHub Desktop.
Save ejhayes/93e965d4edf95f53091e5c86dcf453f8 to your computer and use it in GitHub Desktop.
Merge vault secrets and export them to environment variables
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