Skip to content

Useful gcloud commands

Get projects

gcloud projects list

List organizations

gcloud organizations list --format="value(ID)"

List folders in GCP Org

gcloud resource-manager folders list --organization=$(gcloud organizations list --format="value(ID)")


How to get the uri

simply append --uri to get the URI

List Networks

gcloud compute network list --project=<>

List subnets

gcloud compute networks subnets list --project=<>

Enabled Services

Get all enabled service in a project

gcloud services list --enabled --project=<>

Get Just the name

gcloud services list --enabled --format="value("
gcloud services list --format=json  | jq '.[]' | tr -d '"'

Additional Reading

Want to make this site better? Open a PR or help fund hosting costs