I am new to Google cloud platform and still learning. I am interested in organizations, where I will have multiple accounts in multiple regions. Is there a way I can query resources based on some configuration parameters across all my accounts? Example - list all Virtual machines which are in US West region, micro size and currently stopped.
"Multiple accounts in multiple regions" is an AWS idea which is really antithetical to how things are done in Google Cloud. GCP gives you a lot of tools to slice-and-dice your systems, but none of them work in the "multiple accounts/multiple regions" paradigm.
But if you insist on going that route, your best bet may be to create custom bash scripts which harness gcloud
, the CLI for GCP. It is a pleasure to use, and could probably do any sort of automation, even across accounts, that you have in mind.
gcloud SDK
:gcloud compute instances list --filter="machineType:f1-micro AND status:terminated AND zone:us-west" --project <your-project-id>
– manasouza Jul 4 '19 at 19:32