-1

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.

2
  • Do you mean inside a particular product (micro size VMs - possibly compute engine/GCE?) or across all GCP products? – Dan Cornilescu Jun 5 '19 at 12:10
  • Your example could be done through 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
1

"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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.