Skip to content

Instantly share code, notes, and snippets.

@jlandure
Last active January 17, 2022 15:00
Show Gist options
  • Save jlandure/c075bd8ea9f934322caa5ed4ccf25dcd to your computer and use it in GitHub Desktop.
Save jlandure/c075bd8ea9f934322caa5ed4ccf25dcd to your computer and use it in GitHub Desktop.
while read p; do
gcloud projects get-iam-policy $p --flatten="bindings[].members" --format="value(bindings.members)" --filter="bindings.role:roles/owner"
done <project-gcp.txt
gcloud projects list --filter 'parent.id=xxx'
xxx = folder number or org level
@jlandure
Copy link
Author

project-gcp.txt

project-one
project-two
etc
You need "Organization access right" to discover the list of projects. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment