You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

azure.py 966 B

123456789101112131415161718192021222324
  1. from diagrams import Diagram, Edge
  2. from diagrams.azure.cluster import *
  3. from diagrams.azure.compute import VM
  4. from diagrams.onprem.container import Docker
  5. from diagrams.onprem.cluster import *
  6. from diagrams.azure.network import LoadBalancers
  7. with Diagram(name="", filename="azure", direction="TB", show=True):
  8. with Cluster("Azure"):
  9. with Region("East US2"):
  10. with AvailabilityZone("Zone 2"):
  11. with VirtualNetwork(""):
  12. with SubnetWithNSG("Private"):
  13. # with VMScaleSet(""): # Depends on PR-404
  14. with VMContents("A"):
  15. d1 = Docker("Container")
  16. with ServerContents("A1"):
  17. d2 = Docker("Container")
  18. with Subnet("Public"):
  19. lb = LoadBalancers()
  20. lb >> Edge(forward=True, reverse=True) >> d1
  21. lb >> Edge(forward=True, reverse=True) >> d2