Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module "nxos" {

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.8.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 2.3.0 |
| <a name="requirement_nxos"></a> [nxos](#requirement\_nxos) | >= 0.5.9 |
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.2.6 |
Expand Down Expand Up @@ -141,6 +141,7 @@ module "nxos" {
| [nxos_pim_anycast_rp_peer.pim_anycast_rp_peer](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_anycast_rp_peer) | resource |
| [nxos_pim_instance.pim_instance](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_instance) | resource |
| [nxos_pim_interface.pim_interface](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_interface) | resource |
| [nxos_pim_ssm_range.pim_ssm_range](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_ssm_range) | resource |
| [nxos_pim_static_rp.pim_static_rp](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_static_rp) | resource |
| [nxos_pim_static_rp_group_list.pim_static_rp_group_list](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_static_rp_group_list) | resource |
| [nxos_pim_static_rp_policy.pim_static_rp_policy](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/pim_static_rp_policy) | resource |
Expand Down
1 change: 1 addition & 0 deletions defaults/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ defaults:
pim:
vrfs:
admin_state: true
ssm_range_none: false
ospf_processes:
vrfs:
admin_state: true
Expand Down
18 changes: 17 additions & 1 deletion nxos_pim.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ locals {
anycast_rp_local_interface = try(vrf.anycast_rp_local_interface, local.defaults.nxos.devices.configuration.routing.pim.vrfs.anycast_rp_local_interface, "unspecified")
anycast_rp_source_interface = try(vrf.anycast_rp_source_interface, local.defaults.nxos.devices.configuration.routing.pim.vrfs.anycast_rp_source_interface, "unspecified")
rp = try(length(vrf.rps), 0) > 0
ssm_ranges = try(vrf.ssm_ranges, [])
ssm_prefix_list = try(vrf.ssm_prefix_list, "")
ssm_route_map = try(vrf.ssm_route_map, "")
ssm_none = try(vrf.ssm_range_none, local.defaults.nxos.devices.configuration.routing.pim.vrfs.ssm_range_none)
}
]
])
Expand All @@ -40,6 +44,18 @@ resource "nxos_pim_vrf" "pim_vrf" {
]
}

resource "nxos_pim_ssm_range" "pim_ssm_range" {
for_each = { for v in local.routing_pim_vrfs : v.key => v }
vrf_name = nxos_pim_vrf.pim_vrf[each.key].name
group_list_1 = try(each.value.ssm_ranges[0], null)
group_list_2 = try(each.value.ssm_ranges[1], null)
group_list_3 = try(each.value.ssm_ranges[2], null)
group_list_4 = try(each.value.ssm_ranges[3], null)
prefix_list = each.value.ssm_prefix_list
route_map = each.value.ssm_route_map
ssm_none = each.value.ssm_none
}

resource "nxos_pim_static_rp_policy" "pim_static_rp_policy" {
for_each = { for v in local.routing_pim_vrfs : v.key => v if v.rp }
device = each.value.device
Expand All @@ -52,7 +68,7 @@ locals {
for device in local.devices : [
for vrf in try(local.device_config[device.name].routing.pim.vrfs, []) : [
for rp in try(vrf.rps, []) : {
key = format("%s/%s/%s", device.name, vrf.vrf, rp.address)
key = format("%s/%s/%s/%s", device.name, vrf.vrf, rp.address, try(rp.group_range, local.defaults.nxos.devices.configuration.routing.pim.vrfs.rps.group_range, "224.0.0.0/4"))
device = device.name
vrf_key = format("%s/%s", device.name, vrf.vrf)
address = rp.address
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.8.0"
required_version = ">= 1.9.0"

required_providers {
nxos = {
Expand Down
Loading