This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a GCP management tool for discovering and managing Cloud Run services across multiple GCP projects in a large organization (4,667+ projects). The project is in Phase 1: Discovery and Inventory, with future phases planned for monitoring and automation.
./find-cloudrun-projects.shScans all GCP projects for Cloud Run usage. Output is saved to cloud-run-projects.txt. The script:
- Lists all accessible GCP projects via gcloud CLI
- Checks each project for Cloud Run API enablement
- Verifies actual Cloud Run service deployments (not just API enablement)
- Processes sequentially (can take hours with 4,667+ projects)
The project uses a custom gcloud installation path:
/home/john/google-cloud-sdk/bin/gcloudRequired permissions:
resourcemanager.projects.list- list projectsserviceusage.services.list- check enabled APIsrun.services.list- list Cloud Run services
The discovery script uses a two-stage verification approach:
- API Check: Filters projects by checking if
run.googleapis.comis enabled - Service Check: Verifies actual Cloud Run service deployments (avoids false positives from projects with API enabled but no services)
This reduces noise by only identifying projects with active Cloud Run usage, not just API access.
cloud-run-projects.txt contains one project ID per line, sorted alphabetically.
Phase 2 and 3 features are documented in PROJECT_GOALS.md but not yet implemented:
- Phase 2: Monitoring, cost tracking, automated reporting
- Phase 3: Bulk operations, automation, dashboards
When extending this codebase, follow the phased approach outlined in PROJECT_GOALS.md.