Skip to content

Commit

Permalink
add dhcp policies to bridge domain (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
juchowan authored Oct 17, 2024
1 parent e380b67 commit 11f1094
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ndo_schemas.tf
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,13 @@ locals {
multi_destination_flooding = local.multi_destination_flooding_map[try(bd.multi_destination_flooding, local.defaults.ndo.schemas.templates.bridge_domains.multi_destination_flooding)]
unknown_multicast_flooding = local.unknown_multicast_map[try(bd.unknown_ipv4_multicast, local.defaults.ndo.schemas.templates.bridge_domains.unknown_ipv4_multicast)]
ipv6_unknown_multicast_flooding = local.unknown_multicast_map[try(bd.unknown_ipv6_multicast, local.defaults.ndo.schemas.templates.bridge_domains.unknown_ipv6_multicast)]
dhcp_policies = [
for pol in try(bd.dhcp_policies, []) : {
key = "${bd.name}/${pol.dhcp_relay_policy}"
name = pol.dhcp_relay_policy
dhcp_option_policy_name = try(pol.dhcp_option_policy, null)
}
]
}
]
]
Expand Down Expand Up @@ -598,6 +605,14 @@ resource "mso_schema_template_bd" "schema_template_bd" {
multi_destination_flooding = each.value.multi_destination_flooding
unknown_multicast_flooding = each.value.unknown_multicast_flooding

dynamic "dhcp_policies" {
for_each = { for pol in try(each.value.dhcp_policies, []) : pol.key => pol }
content {
name = dhcp_policies.value.name
dhcp_option_policy_name = dhcp_policies.value.dhcp_option_policy_name
}
}

depends_on = [mso_schema_template_vrf.schema_template_vrf]
}

Expand Down

0 comments on commit 11f1094

Please sign in to comment.