Skip to content

Instantly share code, notes, and snippets.

@MeiyappanKannappa
Created December 3, 2023 08:14
Show Gist options
  • Select an option

  • Save MeiyappanKannappa/bc184713d24f92622f7047b6c815a288 to your computer and use it in GitHub Desktop.

Select an option

Save MeiyappanKannappa/bc184713d24f92622f7047b6c815a288 to your computer and use it in GitHub Desktop.
from diagrams import Cluster, Diagram, Edge
from diagrams.gcp.network import CDN, DNS, LoadBalancing
from diagrams.gcp.compute import Run
from diagrams.gcp.database import SQL
with (Diagram("GCP Cloud Architecture", show=True)):
dns = DNS("DNS")
# Create first logical grouping
with Cluster("Product X") :
# Create second inner logical grouping
with Cluster("Services"):
flow = [Run("APIs"),
Run("Capability")]
with Cluster("Database"):
flow >> Edge(color="black") >> SQL("PostgresQL")
dns >> CDN("CDN") >> LoadBalancing("Load Balancer") >> Edge(color="black") >> flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment