diff --git a/README.md b/README.md index 94121fa..ec179bd 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,7 @@ module "iosxe" { | [iosxe_lldp.lldp](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/lldp) | resource | | [iosxe_logging.logging](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/logging) | resource | | [iosxe_mdt_subscription.mdt_subscription](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/mdt_subscription) | resource | +| [iosxe_mpls.mpls](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/mpls) | resource | | [iosxe_msdp.msdp](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/msdp) | resource | | [iosxe_nat.nat](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/nat) | resource | | [iosxe_ntp.ntp](https://registry.terraform.io/providers/CiscoDevNet/iosxe/0.10.2/docs/resources/ntp) | resource | diff --git a/iosxe_mpls.tf b/iosxe_mpls.tf new file mode 100644 index 0000000..61a5aa1 --- /dev/null +++ b/iosxe_mpls.tf @@ -0,0 +1,18 @@ +resource "iosxe_mpls" "mpls" { + for_each = { for device in local.devices : device.name => device if try(local.device_config[device.name].mpls, null) != null } + device = each.value.name + + label_protocol = try(local.device_config[each.value.name].mpls.label_protocol, local.defaults.iosxe.configuration.mpls.label_protocol, null) + label_mode_all_vrfs_protocol_all_afs_per_vrf = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_all_afs_per_vrf, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_all_afs_per_vrf, null) + label_mode_all_vrfs_protocol_all_afs_per_prefix = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_all_afs_per_prefix, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_all_afs_per_prefix, null) + label_mode_all_vrfs_protocol_all_afs_per_ce = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_all_afs_per_ce, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_all_afs_per_ce, null) + label_mode_all_vrfs_protocol_all_afs_vrf_conn_aggr = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_all_afs_vrf_conn_aggr, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_all_afs_vrf_conn_aggr, null) + label_mode_all_vrfs_protocol_bgp_vpnv4_per_vrf = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_per_vrf, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_per_vrf, null) + label_mode_all_vrfs_protocol_bgp_vpnv4_per_prefix = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_per_prefix, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_per_prefix, null) + label_mode_all_vrfs_protocol_bgp_vpnv4_per_ce = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_per_ce, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_per_ce, null) + label_mode_all_vrfs_protocol_bgp_vpnv4_vrf_conn_aggr = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_vrf_conn_aggr, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv4_vrf_conn_aggr, null) + label_mode_all_vrfs_protocol_bgp_vpnv6_per_vrf = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_per_vrf, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_per_vrf, null) + label_mode_all_vrfs_protocol_bgp_vpnv6_per_prefix = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_per_prefix, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_per_prefix, null) + label_mode_all_vrfs_protocol_bgp_vpnv6_per_ce = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_per_ce, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_per_ce, null) + label_mode_all_vrfs_protocol_bgp_vpnv6_vrf_conn_aggr = try(local.device_config[each.value.name].mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_vrf_conn_aggr, local.defaults.iosxe.configuration.mpls.label_mode_all_vrfs_protocol_bgp_vpnv6_vrf_conn_aggr, null) +}