fix(fabric): depends_on (#246)

This commit is contained in:
Antoine Lecompte
2026-06-30 19:20:14 +00:00
committed by GitHub
parent 9ad33c444d
commit 789e0361c5
3 changed files with 20 additions and 0 deletions
@@ -36,6 +36,10 @@ resource "junos_interface_physical" "server_lag" {
}
trunk = true
vlan_members = local.trunk_members
# jeremmfr commits per-resource: a trunk member is rejected if the VLAN isn't
# on the box yet, so create the VLANs first.
depends_on = [junos_vlan.this]
}
# Spine uplink bond (jumbo, storm-controlled).
@@ -50,6 +54,8 @@ resource "junos_interface_physical" "ae0" {
trunk = true
vlan_members = local.trunk_members
storm_control = "default"
depends_on = [junos_vlan.this]
}
# IRB gateways for the cluster networks (inter-VLAN filter applied inbound).
@@ -14,4 +14,12 @@ resource "junos_vlan" "this" {
name = each.key
vlan_id = tostring(each.value.id)
l3_interface = each.value.l3
# jeremmfr commits per-resource: an l3_interface vlan is rejected if its IRB
# unit isn't on the box yet, so create the IRBs first.
depends_on = [
junos_interface_logical.irb_public,
junos_interface_logical.irb_private,
junos_interface_logical.irb_host_mgmt,
]
}
@@ -38,6 +38,10 @@ resource "junos_interface_physical" "ae0" {
trunk = true
vlan_members = local.trunk_members
storm_control = "default"
# jeremmfr commits per-resource: a trunk member is rejected if the VLAN isn't
# on the box yet, so create the VLANs first.
depends_on = [junos_vlan.this]
}
# Management-node ports (mgmt-1, mgmt-2) — one channelized port-3 leg per VC member,
@@ -47,6 +51,8 @@ resource "junos_interface_physical" "mgmt_node" {
name = each.value
trunk = true
vlan_members = local.trunk_members
depends_on = [junos_vlan.this]
}
# Preserve the previously-single mgmt-1 port resource (don't destroy/recreate it).