google-app-enginegoogle-cloud-platform

GAE: find project name by project number


I have many GAE projects (more than 60) that I have to map, clean, delete part of them. For some projects I have only "Project number". Is there a way to find out "Project Name" or "Project Id" having "Project number" without going to each project and check it manually?


Solution

  • You can find Project ID with project number by running this command:

    gcloud projects list \
       --filter='PROJECT_NUMBER=(PROJECT_NUMBER_1, ..., PROJECT_NUMBER_N)
    

    Replace PROJECT_NUMBER_X with all the project numbers you have.

    You can read more about filters and their syntax here.