Created
August 3, 2018 01:44
-
-
Save packetpilot/c3021949c75a655bb4f719b9060d80a5 to your computer and use it in GitHub Desktop.
Search for service account identifier across all GCP projects
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
# this slow-and-dirty one-liner has been split for readability | |
for p in $(gcloud projects list | cut -d ' ' -f 1 | grep -v PROJECT_ID); do \ | |
gcloud config set project "${p}" && \ | |
echo "${p}:" && \ | |
gcloud iam service-accounts list \ | |
| grep '12345678901'; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment