-
Notifications
You must be signed in to change notification settings - Fork 0
Service Topology
Module flag: topology
Enabled by default: yes
The Service Topology module discovers direct dependencies of a single Cloud Run service. It infers relationships from service configuration (annotations, environment variables, VPC connector) and Pub/Sub subscription metadata — answering "what does this service depend on?" without requiring a full architecture graph.
For project-wide dependency mapping, see Architecture Graph.
GCP_PROJECT_ID=my-project ./aura-tracker-gcp --modules topologygcloud services enable run.googleapis.com pubsub.googleapis.com monitoring.googleapis.com| Role | Tools that need it |
|---|---|
roles/run.viewer |
Cloud Run service spec |
roles/pubsub.viewer |
Pub/Sub subscription discovery |
roles/monitoring.viewer |
Subscription metric-based discovery |
Discovers dependencies for a single Cloud Run service.
Parameters:
| Name | Required | Description |
|---|---|---|
project_id |
yes | GCP project ID |
region |
yes | Region the service is deployed in |
service_name |
yes | Cloud Run service name |
depth |
no |
1 for direct dependencies only; 2 for deps-of-deps (default: 1) |
Inference sources:
| Source | What it discovers |
|---|---|
run.googleapis.com/cloudsql-instances annotation |
Cloud SQL instance dependencies |
| VPC connector annotation | VPC connectivity |
| Environment variables | Database URLs, Pub/Sub topic names, GCS bucket names, Redis hosts, Secret references |
| Secret Manager volume mounts | Secret dependencies |
| Pub/Sub push subscriptions | Topics this service receives messages from |
Returns: Dependency nodes (with kind, name, region), directed edges (with relationship type and evidence source), confidence level (high/medium/low), relationship summary.
Dependency map
"Show me what the
payments-apiCloud Run service inus-central1depends on."
Database connectivity
"Which Cloud SQL instances does
payments-apiconnect to, and how (private IP via VPC connector or public IP)?"
Secrets inventory
"Which Secret Manager secrets does
auth-serviceinus-central1reference?"
Depth-2 map
"Show me the full 2-level dependency graph for
api-gatewayin project my-project — what does it depend on, and what do those dependencies depend on?"
| Module flag | Why you'd combine it |
|---|---|
cloudrun |
Get service details alongside its dependency map |
pubsub |
Inspect the Pub/Sub topics discovered in the topology |
cloudsql |
Get details of the Cloud SQL instances in the topology |
secretmanager |
Cross-reference secrets found in the topology |
archgraph |
Scale topology to the full project |