-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvlan-pools.tf
29 lines (27 loc) · 1.01 KB
/
vlan-pools.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*_____________________________________________________________________________________________________________________
API Information:
- Class: "fvnsVlanInstP"
- Distinguished name: "uni/infra/vlanns-[{name}]-{allocation_mode}"
GUI Location:
- Fabric > Access Policies > Pools > VLAN:[{name}]
_______________________________________________________________________________________________________________________
*/
resource "aci_vlan_pool" "vlan_pools" {
for_each = local.vlan_pools
annotation = "orchestrator:terraform"
alloc_mode = each.value.allocation_mode
description = each.value.description
name = each.key
}
resource "aci_ranges" "vlans" {
depends_on = [
aci_vlan_pool.vlan_pools
]
for_each = local.vlan_ranges
description = each.value.description
alloc_mode = each.value.allocation_mode
from = "vlan-${each.value.from}"
to = "vlan-${each.value.to}"
role = each.value.role
vlan_pool_dn = aci_vlan_pool.vlan_pools[each.value.vlan_pool].id
}