Skip to content

3. Projects

Projects are the core organizational unit in GCP where all resources are created and billed.


Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Project Characteristics                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Project ID:      web-prod-2026 (immutable, unique)    β”‚
β”‚  Project Number:  123456789012 (auto-assigned)         β”‚
β”‚  Project Name:    Web Production (mutable, display)    β”‚
β”‚                                                         β”‚
β”‚  Purpose:                                              β”‚
β”‚  β€’ Resource container (VMs, DBs, buckets, etc.)        β”‚
β”‚  β€’ Billing boundary (separate billing per project)     β”‚
β”‚  β€’ API enablement (enable services per project)        β”‚
β”‚  β€’ Quota management (resource limits per project)      β”‚
β”‚  β€’ IAM boundary (access control isolation)             β”‚
β”‚  β€’ Audit logging scope                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Identifiers

Three Types of Identifiers

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Project Identifiers Comparison                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Project ID                                            β”‚
β”‚  β€’ User-defined (must be globally unique)              β”‚
β”‚  β€’ Immutable (cannot be changed)                       β”‚
β”‚  β€’ 6-30 characters, lowercase, numbers, hyphens        β”‚
β”‚  β€’ Example: web-prod-2026                              β”‚
β”‚  β€’ Used in: gcloud commands, APIs, URLs                β”‚
β”‚                                                         β”‚
β”‚  Project Number                                        β”‚
β”‚  β€’ Auto-assigned by Google                             β”‚
β”‚  β€’ Immutable (permanent identifier)                    β”‚
β”‚  β€’ Numeric only                                        β”‚
β”‚  β€’ Example: 123456789012                               β”‚
β”‚  β€’ Used in: Service accounts, some APIs                β”‚
β”‚                                                         β”‚
β”‚  Project Name                                          β”‚
β”‚  β€’ User-defined (display name)                         β”‚
β”‚  β€’ Mutable (can be changed anytime)                    β”‚
β”‚  β€’ Not unique (multiple projects can have same name)   β”‚
β”‚  β€’ Example: Web Production                             β”‚
β”‚  β€’ Used in: Console UI, reports                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Lifecycle

Creation

# Create project (auto-assigned to user)
gcloud projects create web-prod-2026 \
  --name="Web Production"

# Create project in folder
gcloud projects create web-prod-2026 \
  --name="Web Production" \
  --folder=FOLDER_ID

# Create project in organization
gcloud projects create web-prod-2026 \
  --name="Web Production" \
  --organization=ORGANIZATION_ID

# Create with labels
gcloud projects create web-prod-2026 \
  --name="Web Production" \
  --labels=environment=production,team=web,cost-center=engineering

# Link billing account
gcloud billing projects link web-prod-2026 \
  --billing-account=BILLING_ACCOUNT_ID

Management

# List projects
gcloud projects list

# List with filter
gcloud projects list --filter="projectId:web-*"

# Describe project
gcloud projects describe web-prod-2026

# Update project name
gcloud projects update web-prod-2026 \
  --name="Web Production Updated"

# Add labels
gcloud projects update web-prod-2026 \
  --update-labels=version=v2,owner=alice

# Remove labels
gcloud projects update web-prod-2026 \
  --remove-labels=version

Deletion and Recovery

# Delete project (soft delete, 30-day recovery period)
gcloud projects delete web-prod-2026

# Undelete project (within 30 days)
gcloud projects undelete web-prod-2026

# Check project lifecycle state
gcloud projects describe web-prod-2026 \
  --format="value(lifecycleState)"

# States: ACTIVE, DELETE_REQUESTED, DELETE_IN_PROGRESS

Project Structure

Typical Project Contents

Project: web-prod-2026
β”‚
β”œβ”€β”€ Compute Resources
β”‚   β”œβ”€β”€ Compute Engine VMs (10 instances)
β”‚   β”œβ”€β”€ GKE Cluster (3-node cluster)
β”‚   β”œβ”€β”€ Cloud Run Services (5 services)
β”‚   └── App Engine Application
β”‚
β”œβ”€β”€ Storage
β”‚   β”œβ”€β”€ Cloud Storage Buckets (15 buckets)
β”‚   β”œβ”€β”€ Persistent Disks (20 disks)
β”‚   └── Filestore Instances (2 instances)
β”‚
β”œβ”€β”€ Databases
β”‚   β”œβ”€β”€ Cloud SQL (2 instances)
β”‚   β”œβ”€β”€ Firestore (1 database)
β”‚   └── Memorystore Redis (1 instance)
β”‚
β”œβ”€β”€ Networking
β”‚   β”œβ”€β”€ VPC Networks (2 networks)
β”‚   β”œβ”€β”€ Subnets (5 subnets)
β”‚   β”œβ”€β”€ Firewall Rules (20 rules)
β”‚   β”œβ”€β”€ Load Balancers (3 LBs)
β”‚   └── Cloud NAT (1 gateway)
β”‚
β”œβ”€β”€ Security & IAM
β”‚   β”œβ”€β”€ Service Accounts (10 accounts)
β”‚   β”œβ”€β”€ IAM Policies
β”‚   β”œβ”€β”€ Secrets (Secret Manager)
β”‚   └── Encryption Keys (Cloud KMS)
β”‚
β”œβ”€β”€ APIs & Services
β”‚   β”œβ”€β”€ Enabled APIs (50 APIs)
β”‚   β”œβ”€β”€ API Keys
β”‚   └── OAuth Credentials
β”‚
└── Monitoring & Logging
    β”œβ”€β”€ Cloud Monitoring Dashboards
    β”œβ”€β”€ Alerting Policies
    β”œβ”€β”€ Log Sinks
    └── Uptime Checks

Project Naming Conventions

Pattern: <service>-<environment>-<region>-<purpose>

Examples:
  βœ“ web-prod-us-frontend
  βœ“ api-prod-eu-backend
  βœ“ data-prod-global-warehouse
  βœ“ ml-dev-us-training
  βœ“ network-shared-global-hub
  βœ“ monitoring-shared-global-central

Pattern: <team>-<app>-<environment>

Examples:
  βœ“ backend-ecommerce-prod
  βœ“ frontend-mobile-staging
  βœ“ data-analytics-dev
  βœ“ devops-cicd-prod

Pattern: <company>-<bu>-<env>-<app>

Examples:
  βœ“ acme-retail-prod-web
  βœ“ acme-analytics-prod-dwh
  βœ“ acme-mobile-dev-ios

Naming Rules

βœ“ Use lowercase letters
βœ“ Use hyphens for separation
βœ“ Include environment (prod/staging/dev)
βœ“ Be descriptive but concise
βœ“ 6-30 characters
βœ“ Start with letter
βœ“ End with letter or number
βœ“ Globally unique

βœ— Avoid underscores
βœ— Avoid special characters
βœ— Avoid generic names (project1, test)
βœ— Avoid PII or sensitive info

Project Quotas and Limits

Common Quotas

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Default Project Quotas                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Compute Engine:                                       β”‚
β”‚  β€’ CPUs: 24 per region                                 β”‚
β”‚  β€’ Persistent Disk: 10 TB per region                   β”‚
β”‚  β€’ In-use IP addresses: 8 per region                   β”‚
β”‚  β€’ VMs: Varies by machine type                         β”‚
β”‚                                                         β”‚
β”‚  Cloud Storage:                                        β”‚
β”‚  β€’ Buckets: 10,000 per project                         β”‚
β”‚  β€’ Objects: Unlimited                                  β”‚
β”‚  β€’ Bandwidth: 200 Gbps egress                          β”‚
β”‚                                                         β”‚
β”‚  Cloud SQL:                                            β”‚
β”‚  β€’ Instances: 100 per project                          β”‚
β”‚  β€’ Storage: 30 TB per instance                         β”‚
β”‚  β€’ Connections: Varies by tier                         β”‚
β”‚                                                         β”‚
β”‚  GKE:                                                  β”‚
β”‚  β€’ Clusters: 50 per project per region                 β”‚
β”‚  β€’ Nodes: 5,000 per cluster                            β”‚
β”‚  β€’ Pods: 110 per node (default)                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Managing Quotas

# View quotas
gcloud compute project-info describe \
  --project=web-prod-2026

# Request quota increase
# (Must be done through Console: IAM & Admin β†’ Quotas)

# Check specific quota
gcloud compute regions describe us-central1 \
  --project=web-prod-2026 \
  --format="table(quotas.metric,quotas.limit,quotas.usage)"

Project IAM

Project-Level Roles

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Common Project Roles                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Owner (roles/owner)                                   β”‚
β”‚  β€’ Full control over project                           β”‚
β”‚  β€’ Manage IAM policies                                 β”‚
β”‚  β€’ Delete project                                      β”‚
β”‚  β€’ Manage billing                                      β”‚
β”‚                                                         β”‚
β”‚  Editor (roles/editor)                                 β”‚
β”‚  β€’ Create/modify/delete resources                      β”‚
β”‚  β€’ Cannot manage IAM                                   β”‚
β”‚  β€’ Cannot delete project                               β”‚
β”‚                                                         β”‚
β”‚  Viewer (roles/viewer)                                 β”‚
β”‚  β€’ Read-only access                                    β”‚
β”‚  β€’ View resources and configurations                   β”‚
β”‚  β€’ Cannot make changes                                 β”‚
β”‚                                                         β”‚
β”‚  Browser (roles/browser)                               β”‚
β”‚  β€’ Browse project hierarchy                            β”‚
β”‚  β€’ View project in console                             β”‚
β”‚  β€’ Minimal permissions                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

IAM Management

# Grant project role
gcloud projects add-iam-policy-binding web-prod-2026 \
  --member='user:alice@company.com' \
  --role='roles/editor'

# Grant to group
gcloud projects add-iam-policy-binding web-prod-2026 \
  --member='group:developers@company.com' \
  --role='roles/viewer'

# Grant to service account
gcloud projects add-iam-policy-binding web-prod-2026 \
  --member='serviceAccount:app@web-prod-2026.iam.gserviceaccount.com' \
  --role='roles/storage.objectViewer'

# Remove role
gcloud projects remove-iam-policy-binding web-prod-2026 \
  --member='user:bob@company.com' \
  --role='roles/editor'

# Get IAM policy
gcloud projects get-iam-policy web-prod-2026

# Set IAM policy from file
gcloud projects set-iam-policy web-prod-2026 policy.yaml

API Management

Enabling APIs

# List enabled APIs
gcloud services list --enabled \
  --project=web-prod-2026

# List available APIs
gcloud services list --available \
  --project=web-prod-2026

# Enable API
gcloud services enable compute.googleapis.com \
  --project=web-prod-2026

# Enable multiple APIs
gcloud services enable \
  compute.googleapis.com \
  storage.googleapis.com \
  sqladmin.googleapis.com \
  container.googleapis.com \
  --project=web-prod-2026

# Disable API
gcloud services disable compute.googleapis.com \
  --project=web-prod-2026

# Check if API is enabled
gcloud services list --enabled \
  --filter="name:compute.googleapis.com" \
  --project=web-prod-2026

Project Migration

Moving Projects

# Move project to folder
gcloud projects move web-prod-2026 \
  --folder=FOLDER_ID

# Move project to organization root
gcloud projects move web-prod-2026 \
  --organization=ORGANIZATION_ID

# Verify move
gcloud projects describe web-prod-2026 \
  --format="value(parent)"

Migration Checklist

Before Migration:
  βœ“ Backup IAM policies
  βœ“ Document current structure
  βœ“ Review destination policies
  βœ“ Check billing account
  βœ“ Test with non-critical project
  βœ“ Communicate with team

After Migration:
  βœ“ Verify access works
  βœ“ Check inherited policies
  βœ“ Test applications
  βœ“ Update documentation
  βœ“ Monitor for issues

Billing

Billing Account Linkage

# List billing accounts
gcloud billing accounts list

# Link billing account to project
gcloud billing projects link web-prod-2026 \
  --billing-account=BILLING_ACCOUNT_ID

# Check billing status
gcloud billing projects describe web-prod-2026

# Unlink billing (disables billable resources)
gcloud billing projects unlink web-prod-2026

Cost Management

# Set budget
gcloud billing budgets create \
  --billing-account=BILLING_ACCOUNT_ID \
  --display-name="Web Prod Budget" \
  --budget-amount=5000 \
  --threshold-rule=percent=50 \
  --threshold-rule=percent=90 \
  --threshold-rule=percent=100 \
  --filter-projects=projects/web-prod-2026

# Export billing to BigQuery
# (Configure in Console: Billing β†’ Billing export)

Terraform Example

# Create project
resource "google_project" "web_prod" {
  name            = "Web Production"
  project_id      = "web-prod-2026"
  folder_id       = var.folder_id
  billing_account = var.billing_account_id

  labels = {
    environment = "production"
    team        = "web"
    cost_center = "engineering"
  }
}

# Enable APIs
resource "google_project_service" "apis" {
  for_each = toset([
    "compute.googleapis.com",
    "storage.googleapis.com",
    "sqladmin.googleapis.com",
    "container.googleapis.com",
  ])

  project = google_project.web_prod.project_id
  service = each.key

  disable_on_destroy = false
}

# Grant IAM roles
resource "google_project_iam_member" "editors" {
  project = google_project.web_prod.project_id
  role    = "roles/editor"
  member  = "group:web-team@company.com"
}

# Create service account
resource "google_service_account" "app" {
  project      = google_project.web_prod.project_id
  account_id   = "web-app"
  display_name = "Web Application Service Account"
}

Best Practices

βœ“ Use descriptive, consistent naming
βœ“ Link billing account immediately
βœ“ Enable required APIs upfront
βœ“ Apply labels for cost tracking
βœ“ Implement least privilege IAM
βœ“ Enable audit logging
βœ“ Set up budgets and alerts
βœ“ Document project purpose
βœ“ Regular access reviews
βœ“ Use service accounts for apps

Next Steps