-
Notifications
You must be signed in to change notification settings - Fork 575
Open
Description
I want to model/draw whole infrastructure once and then render it in different views/levels (details).
Consider this example
DatacenterA: {
NodeA: {
VPNServer <-> _._.DatacenterB.NodeB.VPNServer: Site-to-Site VPN
}
}
DatacenterB: {
NodeB: {
VPNServer
}
}
I want to split DatacenterA
in separate file DatacenterA.d2
and DatacenterB
in DatacenterB.d2
but currently it's not possible because I can't reference outside of file.
DatacenterA.d2: invalid underscore
The use case is using it like this
# High-level overview
# Include everything
...@DatacenterA
...@DatacenterB
# Hide details
DatacenterA.NodeA.*: suspend
DatacenterB.NodeB.*: suspend
# Add high level connections
DatacenterA.NodeA -> DatacenterB.NodeB
DatacenterA.link: layers.Detailed
DatacenterB.link: layers.Detailed
layers: {
Detailed: {
# Most detailed - don't hide anything
...@DatacenterA
...@DatacenterB
}
}
This would allow me to render everything with single source of truth.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status