Google Cloud Platform (GCP)
Clanker supports querying GCP infrastructure using the gcloud CLI. Queries are routed to GCP either by an explicit flag or by automatic keyword detection.
Authentication
GCP authentication uses the gcloud CLI and its standard credential chain.
Setting up authentication
# Login to GCP
gcloud auth login
# Set the default project
gcloud config set project your-project-id
# For the Gemini (Vertex AI) provider, also run:
gcloud auth application-default loginConfiguration
Add your GCP project ID to ~/.clanker.yaml:
infra:
gcp:
project_id: your-gcp-project-idProject ID resolution order
--gcp-projectCLI flaginfra.gcp.project_idin the config fileGCP_PROJECTenvironment variableGOOGLE_CLOUD_PROJECTenvironment variableGCLOUD_PROJECTenvironment variable
Querying GCP
Explicit flag
clanker ask --gcp "List all Cloud Run services"Automatic routing
If your question mentions GCP-specific services, Clanker routes to GCP automatically:
clanker ask "What Cloud Run services are deployed?"Combining with other providers
GCP context can be combined with other providers in a single query:
clanker ask --gcp --terraform "Compare Terraform state with actual GCP resources"Supported Services
Clanker queries GCP services through the gcloud CLI. Commonly queried services include:
- Compute Engine (instances, instance groups)
- Cloud Run (services, revisions)
- Google Kubernetes Engine (GKE clusters)
- Cloud Storage (buckets)
- Cloud SQL (instances)
- BigQuery (datasets, tables)
- Cloud Functions
- Pub/Sub (topics, subscriptions)
- VPC networking
Maker Pipeline
The maker feature supports GCP infrastructure provisioning:
# Generate a plan
clanker ask --maker --gcp "Create a Cloud Run service called my-api from gcr.io/my-project/my-api:latest"
# Apply the plan
clanker ask --apply --plan-file plan.jsonGCP maker plans are output directly without the enrichment step used for AWS plans.
Backend Credentials
For team environments, GCP credentials (including service account JSON) can be stored and retrieved through the Clanker backend:
clanker credentials store gcp
clanker ask --api-key ck_live_abc123 --gcp "List Cloud Run services"