Skip to content

Commit 1c64055

Browse files
[OSPF] Add Advanced OSPF Configuration Module Mapping (#87)
* feat(ospf): Add advanced OSPF configuration module mapping for Epic #510 - Map 17 router-level OSPF attributes (both VRF and non-VRF contexts) - Map 1 interface-level OSPF attribute (multi-area IDs) - Use try() pattern for optional attributes with defaults fallback - Note: fast-reroute is non-VRF only per YANG model Implements Epic #510 Depends on CiscoDevNet/terraform-provider-iosxe#TBD Depends on netascode/nac-iosxe#TBD * style(ospf): apply terraform fmt after upstream merge - Realign equals signs for consistency - No functional changes - Required for CI pre-commit checks --------- Co-authored-by: Andrea Testino <atestini@cisco.com>
1 parent 2f59227 commit 1c64055

File tree

2 files changed

+131
-69
lines changed

2 files changed

+131
-69
lines changed

iosxe_interfaces.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ locals {
163163
md5_auth_key = try(key.md5_auth_key, local.defaults.iosxe.devices.configuration.interfaces.ethernets.ospf.message_digest_keys.md5_auth_key, null)
164164
md5_auth_type = try(key.md5_auth_type, local.defaults.iosxe.devices.configuration.interfaces.ethernets.ospf.message_digest_keys.md5_auth_type, null)
165165
}]
166+
ospf_multi_area_ids = try(length(int.ospf.multi_area_ids) == 0, true) ? null : [for area in int.ospf.multi_area_ids : {
167+
area_id = area
168+
}]
166169
ospfv3 = try(int.ospfv3, null) != null ? true : false
167170
ospfv3_network_type_broadcast = try(int.ospfv3.network_type, local.defaults.iosxe.devices.configuration.interfaces.ethernets.ospfv3.network_type, null) == "broadcast" ? true : null
168171
ospfv3_network_type_non_broadcast = try(int.ospfv3.network_type, local.defaults.iosxe.devices.configuration.interfaces.ethernets.ospfv3.network_type, null) == "non-broadcast" ? true : null
@@ -377,15 +380,16 @@ resource "iosxe_interface_ospf" "ethernet_ospf" {
377380
cost = each.value.ospf_cost
378381
dead_interval = each.value.ospf_dead_interval
379382
hello_interval = each.value.ospf_hello_interval
383+
message_digest_keys = each.value.ospf_message_digest_keys
380384
mtu_ignore = each.value.ospf_mtu_ignore
385+
multi_area_ids = each.value.ospf_multi_area_ids
381386
network_type_broadcast = each.value.ospf_network_type_broadcast
382387
network_type_non_broadcast = each.value.ospf_network_type_non_broadcast
383388
network_type_point_to_multipoint = each.value.ospf_network_type_point_to_multipoint
384389
network_type_point_to_point = each.value.ospf_network_type_point_to_point
385390
priority = each.value.ospf_priority
386-
ttl_security_hops = each.value.ospf_ttl_security_hops
387391
process_ids = each.value.ospf_process_ids
388-
message_digest_keys = each.value.ospf_message_digest_keys
392+
ttl_security_hops = each.value.ospf_ttl_security_hops
389393

390394
depends_on = [
391395
iosxe_interface_ethernet.ethernet,

0 commit comments

Comments
 (0)