diagrams
diagrams copied to clipboard
Alignement issue
Hi,
With the following code
from diagrams import Cluster, Diagram, Edge
from diagrams.aws.security import KMS
from diagrams.onprem.compute import Server
from diagrams.onprem.client import User, Users
from diagrams.onprem.network import Haproxy
from diagrams.generic.blank import Blank
graph_attributes = {
}
with Diagram("C1", graph_attr=graph_attributes) as diag:
with Cluster("DC1"):
kms_1 = KMS("KMS")
users = Users("Users")
security_proxy = Haproxy("HAPrx)")
sec_ops = User("Secops")
kms_1 << sec_ops
with Cluster("DC2"):
blank = Blank()
pscpt = Server("Compute")
kms_2 = KMS("KMS 2")
kms_2 >> pscpt
pscpt << Edge(label="https") << security_proxy << users
kms_1 << Edge(color="firebrick", style="dashed", label="sync") << kms_2
is there a way my KMS get aligned ?
Thanks
like this?
with Diagram("C1"):
with Cluster("DC1"):
sec_ops = User("Secops")
users = Users("Users")
security_proxy = Haproxy("HAPrx)")
kms_1 = KMS("KMS")
with Cluster("DC2"):
pscpt = Server("Compute")
kms_2 = KMS("KMS 2")
sec_ops >> kms_1
users >> security_proxy >> Edge(label="https") >> pscpt
kms_2 >> Edge(minlen="0") >> pscpt
kms_1 << Edge(color="firebrick", style="dashed", label="sync") << kms_2
Yes thx