Google Cloud · Cloud Run · Diagram as code
GCP Cloud Run architecture diagram
Describe Cloud Run services, the APIs that invoke them, and the databases or buckets they use. ArchLex checks GCP relationship endpoints and renders official Google Cloud icons.
API Gateway to Cloud Run to Firestore.
Managed API in front of a Cloud Run service that persists state.
provider gcp
direction LR
api: api-gateway["API Gateway"]
svc: cloud-run["API service"]
store: firestore["State"]
api -[invokes]-> svc
svc -[writes]-> storeCloud Run with Cloud SQL and Cloud Storage.
Connect through the Cloud SQL Auth Proxy pattern and store uploads in a bucket.
provider gcp
direction LR
validation normal
svc: cloud-run["API"]
db: cloud-sql["Postgres"]
bucket: cloud-storage["Uploads"]
svc -[connects]->|Cloud SQL Auth Proxy| db
svc -[writes]-> bucketPattern notes for Cloud Run.
Placement and relationship rules ArchLex enforces for this service.
- Placement. Cloud Run is regional. Place it at the root or under account/region. When you need VPC detail, put supporting resources in vpc/subnet scopes and keep Cloud Run where your design runs it.
- Valid connections. api-gateway|cloud-functions|workflows|pubsub|eventarc -[invokes]-> cloud-run. cloud-run -[writes]|[reads]-> cloud-sql|firestore|cloud-storage|bigquery, and cloud-run -[connects]-> cloud-sql for the Auth Proxy pattern. cloud-run -[publishes]-> pubsub is also valid.
- Triggers. eventarc, cloud-scheduler, cloud-storage and pubsub can -[triggers]-> cloud-run for event-driven services.
Ask an agent to draw it.
Install the ArchLex skill or connect the free MCP server, then paste this prompt.
npx skills add baires/archlexDraw a GCP Cloud Run architecture diagram with API Gateway invoking Cloud Run, Cloud SQL via Auth Proxy, and Cloud Storage for uploads. Validate it and give me a playground link.Prefer MCP? Follow the MCP server guide.
Related Google Cloud examples.
Cloud Run diagram questions.
How do I diagram Cloud Run with ArchLex?
Use the cloud-run resource. Connect APIs with -[invokes]->, databases with -[connects]-> or -[reads]/[writes]->, and buckets with -[writes]-> or -[reads]->.
Does ArchLex support Cloud Run jobs?
Yes. cloud-run-jobs is a separate catalog entry and is a valid invokes/triggers target alongside cloud-run.
Can Cloud Run publish to Pub/Sub?
Yes. cloud-run -[publishes]-> pubsub is declared. Use -[subscribes]-> the other way when the service consumes a topic.
Where is the GCP semantics reference?
See the https://docs.archlex.dev/specs/gcp-semantics/ for scopes, catalog entries and relationship rules.
More Google Cloud service diagrams.
Open source · MIT licensed