Skip to content

Conversation

@Dan-Dev-Net
Copy link
Contributor

@Dan-Dev-Net Dan-Dev-Net commented Nov 21, 2025

Related Issue(s)

Fixes #505
Depends on: CiscoDevNet/terraform-provider-iosxe#503
Depends on: netascode/nac-iosxe#504

Proposed Changes

This PR extends the Terraform NAC module to support IS-IS routing protocol configuration with complete integration from NAC YAML to device deployment.

New File: iosxe_isis.tf

  • Processes IS-IS router configuration from NAC YAML
  • Generates iosxe_isis provider resources
  • Implements local.isis_processes with proper try() patterns
  • Handles area_tag, NETs, metric-style, and log-adjacency-changes

Modified File: iosxe_interfaces.tf

  • Extended local.interfaces_loopbacks to include IS-IS configuration
  • Added IS-IS boolean flag for presence detection
  • Implemented metric levels list processing
  • Created iosxe_interface_isis.loopback_isis resource
  • Proper depends_on relationships for IS-IS router process

Module Features:

  • Translates NAC YAML attributes to provider resource format
  • Uses try() patterns with defaults fallback for optional attributes
  • Processes NETs as list of objects
  • Handles per-level interface metrics (level-1, level-2)
  • Follows existing module patterns (consistent with BGP, OSPF)

NAC YAML Format:

routing:
  isis_processes:
    - area_tag: TEST
      nets:
        - tag: 49.0001.1920.0000.2001.00
      metric_style_wide: true
      log_adjacency_changes: true
      log_adjacency_changes_all: true

interfaces:
  loopbacks:
    - id: 506
      isis:
        ipv4_metric_levels:
          - level: level-1
            value: 100
          - level: level-2
            value: 50

Robot Test(s)

End-to-End NAC Workflow Testing:

Test Environment:

  • Device: 10.81.239.57 (IOS-XE 17.15.1)
  • NAC YAML: isis-test.nac.yaml
  • Module: terraform-iosxe-nac-iosxe

Workflow Validated:

NAC YAML → Module → Provider → Device

Test Steps:

  1. Created NAC YAML with IS-IS configuration
  2. Ran terraform init - Module loaded successfully
  3. Ran terraform plan - Module generated correct resources:
    • iosxe_isis.isis with all attributes
    • iosxe_interface_loopback.loopback with IP
    • iosxe_interface_isis.loopback_isis with metrics
  4. Ran terraform apply - All 3 resources created
  5. Verified device CLI - Configuration correct
  6. Ran terraform apply again - Idempotency verified (no changes)

Results:

  • Module correctly translates NAC YAML to provider resources
  • All attributes mapped properly (area_tag, NETs, metric-style, metrics)
  • Resources applied successfully to device
  • Device configuration matches NAC specification
  • Idempotency verified - second apply shows no changes
  • Dependencies work correctly (interface depends on router process)

Device Verification:

router isis EPIC506-NAC-TEST
 net 49.0001.1721.6025.5002.00
 metric-style wide
 log-adjacency-changes all

interface Loopback506
 ip address 192.0.2.100 255.255.255.255
 isis metric 100 level-1
 isis metric 50 level-2

Code Quality:

  • No linter errors
  • Follows module coding standards
  • Consistent naming conventions
  • Proper try() patterns
  • Correct depends_on relationships

Cisco IOS-XE Version

  • Developed against: IOS-XE 17.15.1 (device tested)
  • Compatible with: IOS-XE 17.12.1
  • Module version: Compatible with provider v0.5.6+

External Repo Link

CiscoDevNet/terraform-provider-iosxe#503 (Provider PR - must be merged first)
netascode/nac-iosxe#504 (Schema PR - must be merged first)

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Robot test(s) included or updated for data model updates or additions
  • If applicable, external repo link, e.g. Ansible Collection, provided
  • Assigned the proper reviewers

Fixes #505
Depends on: CiscoDevNet/terraform-provider-iosxe#503
Depends on: netascode/nac-iosxe#504

- Create iosxe_isis.tf for router IS-IS configuration
- Extend iosxe_interfaces.tf for interface IS-IS metrics
- Add try() patterns for optional attributes
- End-to-end NAC workflow validated on device
- Idempotency verified
- Auto-format iosxe_interfaces.tf for consistent spacing
- Auto-update README.md with new IS-IS resource documentation
@danischm danischm marked this pull request as ready for review November 23, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant