Last active
June 15, 2022 23:53
-
-
Save socketbox/8d31afe6a782ed7d4abe07c9cee125c3 to your computer and use it in GitHub Desktop.
Get all secrets and sensitive data for a GCP project
This file contains hidden or 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
#!/usr/bin/env bash | |
set -eou pipefail | |
sec_list=$(gcloud secrets list --format="table[no-heading](name.basename())") | |
for s in ${sec_list[*]}; | |
do | |
sec=$(gcloud secrets versions access latest --secret="$s") | |
printf "%s: %s\n" $s $sec | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment