diagram_from_inventory
Generates architecture diagrams directly from your live Google Cloud inventory, using real resource names and configuration-derived edges. Filters by project, region, or label to document what is actually running.
Instructions
Diagram infrastructure that is already running, from the cloud's own inventory, with real names.
Google Cloud: pass the output of
gcloud asset list --project <id> --content-type resource --format json
(or gcloud asset export newline-delimited JSON) in inventory_json, or a file path inside
the configured input roots. Works however the resources were created (console, gcloud, IaC).
Layout: Project > VPC > Subnet > GKE cluster > namespace. Edges come from configuration
(Cloud SQL/secret/Pub/Sub references, URLs matched to Cloud Run services, load balancer
backends, push subscriptions, Scheduler targets, VPC connectors). Filter with projects,
regions and labels (e.g. {"app": "payments"}); include_neighbors keeps resources that
matched resources connect to. Calls made only in application code are not visible: add those
edges to the returned spec and re-render with generate_architecture_diagram.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| title | Yes | ||
| labels | No | ||
| regions | No | ||
| projects | No | ||
| provider | No | gcp | |
| direction | No | LR | |
| inventory_json | No | ||
| output_formats | No | ||
| render_diagram | No | ||
| include_neighbors | No | ||
| include_kubernetes | No |