-
Notifications
You must be signed in to change notification settings - Fork 48
enhancement(flow)/Add Support for Additional flow Configuration in Terraform Provider #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement(flow)/Add Support for Additional flow Configuration in Terraform Provider #338
Conversation
…ort to flow resource Enhanced the iosxe_flow resource with 6 `flow record` and 9 `flow exporter` attributes to support 9 "flow" cli configuration capabilities. Note, support for 2 additional `flow record` cli configurations that were not originally requested have been added and are now supported. This decision was a result of cli command acceptance that varies based on platform. The solution implemented leverages "test_tags" to accurately test provider code. New Attributes (15 total): - flow_record: - match/datalink/mac/source/address/input - match/datalink/mac/destination/address/input - match/datalink/vlan <-- Note: Available on switch platforms (C9K) using 'test_tags': [C9000V] - match/datalink/source-vlan-id <-- Note: Available on router platforms (C8K, CSR1K) using 'test_tags': [C8000V] - match/datalink/destination-vlan-id <-- Note: Available on router platforms (C8K, CSR1K) using 'test_tags': [C8000V] - match/ipv4/ttl - flow exporter <name>: - source/interface-choice/GigabitEthernet/GigabitEthernet - source/interface-choice/TwoGigabitEthernet/TwoGigabitEthernet - source/interface-choice/FiveGigabitEthernet/FiveGigabitEthernet - source/interface-choice/TenGigabitEthernet/TenGigabitEthernet - source/interface-choice/TwentyFiveGigE/TwentyFiveGigE - source/interface-choice/FortyGigabitEthernet/FortyGigabitEthernet - source/interface-choice/HundredGigE/HundredGigE - source/interface-choice/Vlan/Vlan - source/interface-choice/Port-channel/Port-channel CLI Commands Supported (9 total): - flow record <name>: - match datalink mac source address input - match datalink mac source address input - match datalink vlan input - match datalink source-vlan-id - match datalink destination-vlan-id - match ipv4 ttl - flow exporter <name>: - source <interface> Files Modified: - gen/definitions/flow_record.yaml - gen/definitions/flow_exporter.yaml - docs/data-sources/flow_exporter.md - docs/data-sources/flow_record.md - docs/resources/flow_exporter.md - docs/resources/flow_record.md - examples/resources/iosxe_flow_record/resource.tf - internal/provider/data_source_iosxe_flow_exporter.go - internal/provider/data_source_iosxe_flow_record.go - internal/provider/data_source_iosxe_flow_record_test.go - internal/provider/model_iosxe_flow_exporter.go - internal/provider/model_iosxe_flow_record.go - internal/provider/resource_iosxe_flow_exporter.go - internal/provider/resource_iosxe_flow_record.go - internal/provider/resource_iosxe_flow_record_test.go
gen/definitions/flow_exporter.yaml
Outdated
| example: 0/0/1 | ||
| - yang_name: source/interface-choice/TwentyFiveGigE/TwentyFiveGigE | ||
| xpath: source/TwentyFiveGigE | ||
| tf_name: source_twenty_five_gig_e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we did not abbreviate this with "gig_e" in other instances. Please align this with other interface type references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that. Corrections have been made to both this and the source_hundred_gig_e names in a9a87aa
Renamed tf_name attributes in flow_exporter.yaml to align with other interface type references, improving clarity and consistency. - Updated 'source_twenty_five_gig_e' to 'source_twenty_five_gigabit_ethernet' - Updated 'source_hundred_gig_e' to 'source_hundred_gigabit_ethernet'.
Renamed attributes in the flow exporter documentation and code, improving clarity and maintaining consistency across the interface types. - Updated 'source_hundred_gig_e' to 'source_hundred_gigabit_ethernet' - Updated 'source_twenty_five_gig_e' to 'source_twenty_five_gigabit_ethernet'
This PR adds support for additional flow configuration in the terraform-provider-iosxe.
These improvements enhance the
iosxe_flow_recordandiosxe_flow_exporterresources with comprehensive flow configuration capabilities including enhanced datalink layer matching, IPv4 TTL-based flow tracking, and flexible source interface selection for flow exporters.CLI Commands Supported
flow recordSupportflow exporterSupportBenefits:
Platform Compatibility:
This PR includes platform-aware attribute handling, ensuring seamless operation across both Catalyst 9000 series switches and Catalyst 8000/CSR1000v router platforms. The provider automatically uses the appropriate YANG paths for each platform type.