In GCP how to list all the resources running under project

+1 vote
I have to make a list of every instance, container, function, notebook, bucket, data proc, and composer that is currently active for the project across all regions and locales.

Is it feasible to provide a list of resources for every region? I can use either a Python script or Gcloud.

After listing, my ultimate goal is to assign a tag that corresponds to the resource's name.

Thanks
Nov 10, 2022 in GCP by Tejashwini
• 3,820 points
12,349 views

1 answer to this question.

0 votes

For a specific organization, folder, or project, you can use search-all-resources to search all the resources across services (or APIs) and projects.

To use the number 123 to search every resource in a project:

$ gcloud asset search-all-resources --scope=projects/123

Hope this helps!
Check out this google cloud certification program to learn more.

answered Nov 10, 2022 by Ashwini
• 5,430 points

edited Sep 6, 2023 by Khan Sarfaraz

Related Questions In GCP

+2 votes
1 answer

How to list down all the projects in GCP Cloud?

Hi@akhtar, GCP Shell has a command named gcloud. ...READ MORE

answered Aug 23, 2020 in GCP by MD
• 95,460 points
4,154 views
0 votes
1 answer

How to change the project in GCP using CLI command?

Hi@akhtar, If you configured GCP SDK in your ...READ MORE

answered Sep 13, 2020 in GCP by MD
• 95,460 points
2,750 views
0 votes
1 answer

How to create a new project in GCP using the command line?

Hi@akhtar, You need to configure GCP SDK in ...READ MORE

answered Nov 9, 2020 in GCP by MD
• 95,460 points
1,159 views
0 votes
1 answer

How to set the project property in the core section in GCP?

Hi@akhtar, The gcloud config set command sets the specified ...READ MORE

answered Nov 9, 2020 in GCP by MD
• 95,460 points
1,991 views
0 votes
1 answer

How to change the project in GCP using CLI commands?

gcloud config set project $MY_PROJECT_ID #=> Updated property [core/project]. You ...READ MORE

answered Nov 4, 2022 in GCP by Tejashwini
• 3,820 points
1,471 views
0 votes
1 answer

Using the Google Cloud Platform SDK CLI to List all Active Resources Under a Given Project

For a specific organization, folder, or project, ...READ MORE

answered Nov 7, 2022 in GCP by Tejashwini
• 3,820 points
848 views
0 votes
1 answer

Google cloud: How to list all service-accounts from all Projects in GCP

It's been noted by the commenters that ...READ MORE

answered Nov 10, 2022 in GCP by Tejashwini
• 3,820 points
1,465 views
0 votes
2 answers
0 votes
1 answer

GCP - how to add a Google account as an IAM principal to a project?

I post this community wiki answer to ...READ MORE

answered Nov 10, 2022 in GCP by Ashwini
• 5,430 points
1,182 views
0 votes
1 answer

How can I perform data lineage in GCP?

There isn't a serverless data lineage service ...READ MORE

answered Nov 8, 2022 in GCP by Ashwini
• 5,430 points
949 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP