File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ module "iosxr" {
6666| [ iosxr_domain.domain] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/domain ) | resource |
6767| [ iosxr_domain_vrf.domain_vrf] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/domain_vrf ) | resource |
6868| [ iosxr_evpn.evpn] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/evpn ) | resource |
69+ | [ iosxr_flow_sampler_map.flow_sampler_map] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/flow_sampler_map ) | resource |
6970| [ iosxr_hostname.hostname] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/hostname ) | resource |
7071| [ iosxr_interface.interface] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/interface ) | resource |
7172| [ iosxr_ipv4_prefix_list.ipv4_prefix_list] ( https://registry.terraform.io/providers/CiscoDevNet/iosxr/latest/docs/resources/ipv4_prefix_list ) | resource |
Original file line number Diff line number Diff line change 1+ locals {
2+ device_flow_sampler_maps = flatten ([
3+ for device in local . devices : [
4+ for sampler_map in try (local. device_config [device . name ]. flow_sampler_map , []) : {
5+ device_name = device . name
6+ key = " ${ device . name } -flow-sampler-map-${ sampler_map . name } "
7+ name = try (sampler_map. name , local. defaults . iosxr . configuration . flow_sampler_map . name , null )
8+ random = try (sampler_map. random , local. defaults . iosxr . configuration . flow_sampler_map . random , null )
9+ out_of = try (sampler_map. out_of , local. defaults . iosxr . configuration . flow_sampler_map . out_of , null )
10+ }
11+ ]
12+ ])
13+ }
14+
15+ resource "iosxr_flow_sampler_map" "flow_sampler_map" {
16+ for_each = { for sampler_map in local . device_flow_sampler_maps : sampler_map . key => sampler_map }
17+ device = each. value . device_name
18+
19+ name = each. value . name
20+ random = each. value . random
21+ out_of = each. value . out_of
22+ }
You can’t perform that action at this time.
0 commit comments