Hi,
In the source file iosxe_interfaces.tf I found that device_tracking and device_tracking_attached_policies is supported, but undocumented both in schema and in official documentation. So I tried applying device tracking anyway and NaC never configured it. Claude helped me troubleshoot and wrote up the issue below.
Let me know if I can do anything!
David
Description
The NaC YAML supports device_tracking and device_tracking_attached_policies under interfaces.port_channels[], and local.interfaces_port_channels in iosxe_interfaces.tf correctly parses both values from the YAML (lines ~1731-1734). However, the resource "iosxe_interface_port_channel" "port_channel" block (starting at line 1888) never references each.value.device_tracking or each.value.device_tracking_attached_policies, so the parsed values are silently discarded and never applied to the device.
This works correctly for Ethernet interfaces — resource "iosxe_interface_ethernet" "ethernet" (line 318) explicitly wires both attributes at lines 395-396:
device_tracking = each.value.device_tracking
device_tracking_attached_policies = each.value.device_tracking_attached_policies
The equivalent lines are simply missing from the port-channel resource block.
Reproduction
iosxe:
devices:
- name: SW1
host: 10.10.10.10
configuration:
interfaces:
port_channels:
- id: 1
device_tracking: true
device_tracking_attached_policies:
- name: DISABLE-IP-TRACKING
Run terraform plan / apply — no device-tracking configuration is proposed or pushed to the Port-channel interface, even though the same block works fine on a physical Ethernet interface.
Expected behavior
device_tracking and device_tracking_attached_policies should be applied to iosxe_interface_port_channel the same way they are for iosxe_interface_ethernet.
Suggested fix
Add the following two lines to the iosxe_interface_port_channel.port_channel resource block in iosxe_interfaces.tf:
device_tracking = each.value.device_tracking
device_tracking_attached_policies = each.value.device_tracking_attached_policies
Environment
- Module: netascode/terraform-iosxe-nac-iosxe (main, commit fc8017f)
- Provider: CiscoDevNet/iosxe v1.0.0
- Terraform: v1.15.8
- Platform: Catalyst C9200L
Hi,
In the source file
iosxe_interfaces.tfI found thatdevice_trackinganddevice_tracking_attached_policiesis supported, but undocumented both in schema and in official documentation. So I tried applying device tracking anyway and NaC never configured it. Claude helped me troubleshoot and wrote up the issue below.Let me know if I can do anything!
David
Description
The NaC YAML supports
device_trackinganddevice_tracking_attached_policiesunderinterfaces.port_channels[], andlocal.interfaces_port_channelsiniosxe_interfaces.tfcorrectly parses both values from the YAML (lines ~1731-1734). However, theresource "iosxe_interface_port_channel" "port_channel"block (starting at line 1888) never referenceseach.value.device_trackingoreach.value.device_tracking_attached_policies, so the parsed values are silently discarded and never applied to the device.This works correctly for Ethernet interfaces —
resource "iosxe_interface_ethernet" "ethernet"(line 318) explicitly wires both attributes at lines 395-396:The equivalent lines are simply missing from the port-channel resource block.
Reproduction
Run
terraform plan/apply— nodevice-trackingconfiguration is proposed or pushed to the Port-channel interface, even though the same block works fine on a physical Ethernet interface.Expected behavior
device_trackinganddevice_tracking_attached_policiesshould be applied toiosxe_interface_port_channelthe same way they are foriosxe_interface_ethernet.Suggested fix
Add the following two lines to the
iosxe_interface_port_channel.port_channelresource block iniosxe_interfaces.tf:Environment