Skip to content

Service Topology

Anna edited this page Jun 25, 2026 · 1 revision

Module: Service Topology

Module flag: topology Enabled by default: yes


Overview

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.


Enable This Module

GCP_PROJECT_ID=my-project ./aura-tracker-gcp --modules topology

Required GCP APIs

gcloud services enable run.googleapis.com pubsub.googleapis.com monitoring.googleapis.com

Required IAM Permissions

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

Tools

gcp_get_service_topology

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.


Prompt Examples

Dependency map

"Show me what the payments-api Cloud Run service in us-central1 depends on."

Database connectivity

"Which Cloud SQL instances does payments-api connect to, and how (private IP via VPC connector or public IP)?"

Secrets inventory

"Which Secret Manager secrets does auth-service in us-central1 reference?"

Depth-2 map

"Show me the full 2-level dependency graph for api-gateway in project my-project — what does it depend on, and what do those dependencies depend on?"


Related Modules

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

Clone this wiki locally