• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives
  • Sources
  • Search

Search

GCP Projects List

March 26, 2020

Here’s how to get a list of GCP projects.

gcloud projects list 

Result:

PROJECT_ID            NAME     PROJECT_NUMBER
your-project-id-xxxx  servers  xxxxxxxxxxxx

Use awk to display the project id only.

gcloud projects list | awk '{print $1}'

Result

PROJECT ID
your-project-id-xxxx

Filed Under: Cloud Tagged With: awk, gcp, id, list, projects

  • Home
  • About
  • Archives
  • Sources
  • Search

Copyright © 2023