Skip to content

Instantly share code, notes, and snippets.

@cxhercules
Last active November 19, 2018 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cxhercules/73cc6bcab1339fa64e79b21f27736580 to your computer and use it in GitHub Desktop.
Save cxhercules/73cc6bcab1339fa64e79b21f27736580 to your computer and use it in GitHub Desktop.

Read from vault without saving secret value

vault read -field=value "secret/gcp-creds/${SERVICE_ACCOUNT_PROJECT_ID}/${SERVICE_ACCOUNT_NAME}.json" \
  | gcloud auth activate-service-account "${SERVICE_ACCOUNT_EMAIL}" --key-file -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment