Last active
May 30, 2023 21:58
-
-
Save smaslennikov/2c8a9c203db7ed57286f6e94b9f5a5be to your computer and use it in GitHub Desktop.
find disks in all projects
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
#!bin/bash | |
for i in $(gcloud projects list | \ | |
grep -v PROJECT_NUMBER | \ | |
cut -d ' ' -f 1); do | |
gcloud config set project $i | |
gcloud compute disks list \ | |
--filter="local-ssd" \ | |
--uri | \ | |
cut -d / -f 9 | |
done | \ | |
sort | \ | |
uniq -c |
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
Updated property [core/project]. | |
Updated property [core/project]. | |
1 northamerica-northeast2-a | |
1 us-central1-a | |
1 us-central1-f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment