Is it possible to list, through the Google Cloud Platform (GCP) SDK CLI (gcloud
), all active resources under a given GCP project?
gcloud config set project : Set a default Google Cloud project to work on. gcloud info : Display current gcloud CLI environment details.
What is the gcloud CLI? The Google Cloud CLI is a set of tools to create and manage Google Cloud resources. You can use these tools to perform many common platform tasks from the command line or through scripts and other automation.
You can use search-all-resources to search all the resources across services (or APIs) and projects for a given organization, folder, or project.
To search all the resources in a project with number 123:
$ gcloud asset search-all-resources --scope=projects/123
See the other post for more details: How to find, list, or search resources across services (APIs) and projects in Google Cloud Platform?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With