Google Cloud (GCP)
Google Cloud Platform is Google's cloud platform, organized around a
resource hierarchy (Organization → Folders → Projects → Resources) that
is more explicitly hierarchical by default than AWS's account/region model,
and known for services drawing directly on Google's own internal
infrastructure (BigQuery's Dremel/Colossus lineage, Kubernetes originating
from Google's internal Borg).
Resource hierarchy and projects
- Organization (root, tied to a domain) → Folders (optional grouping,
e.g. per business unit) → Projects (the actual container for
resources and billing) → Resources (VMs, buckets, etc.).
- Every resource belongs to exactly one Project, identified by a
globally-unique project ID — this is the unit most IAM bindings, quotas,
and billing attach to, roughly analogous to (but stricter than) an AWS
account.
- IAM policies and organization policies inherit down the hierarchy —
a policy set at the Organization or Folder level applies to every Project
beneath it unless explicitly overridden.
Identity and access: IAM
gcloud projects add-iam-policy-binding my-project \
--member="user:alice@example.com" \
--role="roles/storage.objectViewer"
- GCP IAM roles come in three kinds: basic (Owner/Editor/Viewer —
broad, legacy, generally too coarse for production use), predefined
(curated per-service roles like
roles/storage.objectViewer), and
custom (org-defined, assembled from individual permissions).
Predefined roles are the usual default; reach for custom only when no
predefined role fits the actual need.
- A service account is an identity for a workload (not a person) — used
by a Compute Engine VM, a Cloud Run service, or a CI pipeline to call
other GCP APIs without embedding a person's credentials.
Core service map (by category, not exhaustive)
| Category |
Common services |
| Compute |
Compute Engine (VMs), Cloud Run (serverless containers), GKE (managed Kubernetes), Cloud Functions (serverless functions) |
| Storage |
Cloud Storage (object storage), Persistent Disk (block storage) |
| Database |
Cloud SQL (managed Postgres/MySQL/SQL Server), Spanner (globally-distributed, strongly-consistent SQL), Firestore/Bigtable (NoSQL) |
| Data & analytics |
BigQuery (serverless data warehouse), Dataflow (stream/batch processing), Pub/Sub (messaging) |
| Networking |
VPC, Cloud Load Balancing, Cloud DNS, Cloud CDN |
| Identity/security |
Cloud IAM, Secret Manager, Cloud KMS |
| AI/ML |
Vertex AI (the unified ML platform, including Gemini API access) |
Infrastructure as code and CLI
gcloud auth login
gcloud config set project my-project
gcloud compute instances list
# Terraform (the most common IaC tool for GCP; there's no CloudFormation-equivalent GCP-native templating language in wide use)
resource "google_storage_bucket" "example" {
name = "my-bucket"
location = "US"
}
Unlike AWS, GCP doesn't have an equally dominant native declarative
templating service — Terraform is the de facto standard for GCP
infrastructure as code in most organizations, alongside Google's own
Deployment Manager (older) and Config Connector (for managing GCP
resources via Kubernetes-style YAML from within GKE).
Distinctive capabilities
- BigQuery — a serverless data warehouse queried with standard SQL,
billed by data scanned (or a flat-rate slot model), with no cluster to
size or manage — a genuinely different operational model than a
self-managed data warehouse.
- Cloud Spanner — a globally distributed relational database offering
strong consistency and horizontal scalability together, a combination
most relational databases don't attempt.
- GKE Autopilot — a Kubernetes mode where Google manages node
provisioning/sizing entirely, billing per-pod-resource rather than
per-node, distinct from the "standard" mode where you manage the node
pool yourself.
- Live migration for Compute Engine VMs — Google can migrate a running
VM off hardware scheduled for maintenance without a reboot, unlike a
typical VM host's maintenance-window restart requirement.
Common pitfalls
- Using Basic roles (Owner/Editor/Viewer) in production — far broader
than almost any real need; use predefined or custom roles scoped to the
actual task.
- A service account key file (JSON) committed to source control —
prefer workload identity federation or attaching a service account
directly to the compute resource, avoiding a long-lived downloadable key
entirely where possible.
- Assuming IAM policy at the Project level is the only place to check
— an inherited Organization- or Folder-level policy/deny rule can be the
actual reason a permission isn't working as expected.
- Confusing GCP's Project ID with its Project Name/Number — the ID is
what's globally unique and used in most API calls/URLs; the display name
is not guaranteed unique and isn't a valid identifier in most contexts.
- Underestimating BigQuery cost from an unbounded
SELECT * — since
billing is per-byte-scanned in on-demand pricing, querying unneeded
columns/partitions on a large table has a direct cost impact that a
traditional indexed database wouldn't.
Learn more
1---2name: google-cloud3description: Use when asked to write or debug Google Cloud Platform (GCP) infrastructure (gcloud CLI, Terraform against GCP), choose a compute/storage/database service, configure IAM, or explain GCP-specific concepts (projects, resource hierarchy, VPCs) — independent of any specific application framework.4metadata:5 source: https://skillmd.com/skills/skills-on-ai/google-cloud6---78# Google Cloud (GCP)910Google Cloud Platform is Google's cloud platform, organized around a11**resource hierarchy** (Organization → Folders → Projects → Resources) that12is more explicitly hierarchical by default than AWS's account/region model,13and known for services drawing directly on Google's own internal14infrastructure (BigQuery's Dremel/Colossus lineage, Kubernetes originating15from Google's internal Borg).1617## Resource hierarchy and projects1819- **Organization** (root, tied to a domain) → **Folders** (optional grouping,20 e.g. per business unit) → **Projects** (the actual container for21 resources and billing) → **Resources** (VMs, buckets, etc.).22- Every resource belongs to exactly one **Project**, identified by a23 globally-unique project ID — this is the unit most IAM bindings, quotas,24 and billing attach to, roughly analogous to (but stricter than) an AWS25 account.26- IAM policies and organization policies **inherit down** the hierarchy —27 a policy set at the Organization or Folder level applies to every Project28 beneath it unless explicitly overridden.2930## Identity and access: IAM3132```sh33gcloud projects add-iam-policy-binding my-project \34 --member="user:alice@example.com" \35 --role="roles/storage.objectViewer"36```3738- GCP IAM roles come in three kinds: **basic** (Owner/Editor/Viewer —39 broad, legacy, generally too coarse for production use), **predefined**40 (curated per-service roles like `roles/storage.objectViewer`), and41 **custom** (org-defined, assembled from individual permissions).42 Predefined roles are the usual default; reach for custom only when no43 predefined role fits the actual need.44- A **service account** is an identity for a workload (not a person) — used45 by a Compute Engine VM, a Cloud Run service, or a CI pipeline to call46 other GCP APIs without embedding a person's credentials.4748## Core service map (by category, not exhaustive)4950| Category | Common services |51| --- | --- |52| Compute | Compute Engine (VMs), Cloud Run (serverless containers), GKE (managed Kubernetes), Cloud Functions (serverless functions) |53| Storage | Cloud Storage (object storage), Persistent Disk (block storage) |54| Database | Cloud SQL (managed Postgres/MySQL/SQL Server), Spanner (globally-distributed, strongly-consistent SQL), Firestore/Bigtable (NoSQL) |55| Data & analytics | BigQuery (serverless data warehouse), Dataflow (stream/batch processing), Pub/Sub (messaging) |56| Networking | VPC, Cloud Load Balancing, Cloud DNS, Cloud CDN |57| Identity/security | Cloud IAM, Secret Manager, Cloud KMS |58| AI/ML | Vertex AI (the unified ML platform, including Gemini API access) |5960## Infrastructure as code and CLI6162```sh63gcloud auth login64gcloud config set project my-project65gcloud compute instances list66```6768```hcl69# Terraform (the most common IaC tool for GCP; there's no CloudFormation-equivalent GCP-native templating language in wide use)70resource "google_storage_bucket" "example" {71 name = "my-bucket"72 location = "US"73}74```7576Unlike AWS, GCP doesn't have an equally dominant native declarative77templating service — **Terraform** is the de facto standard for GCP78infrastructure as code in most organizations, alongside Google's own79**Deployment Manager** (older) and **Config Connector** (for managing GCP80resources via Kubernetes-style YAML from within GKE).8182## Distinctive capabilities8384- **BigQuery** — a serverless data warehouse queried with standard SQL,85 billed by data scanned (or a flat-rate slot model), with no cluster to86 size or manage — a genuinely different operational model than a87 self-managed data warehouse.88- **Cloud Spanner** — a globally distributed relational database offering89 strong consistency and horizontal scalability together, a combination90 most relational databases don't attempt.91- **GKE Autopilot** — a Kubernetes mode where Google manages node92 provisioning/sizing entirely, billing per-pod-resource rather than93 per-node, distinct from the "standard" mode where you manage the node94 pool yourself.95- **Live migration** for Compute Engine VMs — Google can migrate a running96 VM off hardware scheduled for maintenance without a reboot, unlike a97 typical VM host's maintenance-window restart requirement.9899## Common pitfalls100101- **Using Basic roles (Owner/Editor/Viewer) in production** — far broader102 than almost any real need; use predefined or custom roles scoped to the103 actual task.104- **A service account key file (JSON) committed to source control** —105 prefer workload identity federation or attaching a service account106 directly to the compute resource, avoiding a long-lived downloadable key107 entirely where possible.108- **Assuming IAM policy at the Project level is the only place to check**109 — an inherited Organization- or Folder-level policy/deny rule can be the110 actual reason a permission isn't working as expected.111- **Confusing GCP's Project ID with its Project Name/Number** — the ID is112 what's globally unique and used in most API calls/URLs; the display name113 is not guaranteed unique and isn't a valid identifier in most contexts.114- **Underestimating BigQuery cost from an unbounded `SELECT *`** — since115 billing is per-byte-scanned in on-demand pricing, querying unneeded116 columns/partitions on a large table has a direct cost impact that a117 traditional indexed database wouldn't.118119## Learn more120121- [Google Cloud documentation](https://cloud.google.com/docs)122- [Google Cloud Architecture Framework](https://cloud.google.com/architecture/framework) — the canonical cross-cutting best-practices reference.123- [gcloud CLI reference](https://cloud.google.com/sdk/gcloud/reference)124- [Terraform Google provider docs](https://registry.terraform.io/providers/hashicorp/google/latest/docs)