Skip to content

Commit f7874ac

Browse files
committed
added aep to epg mapping
1 parent 5f14b00 commit f7874ac

File tree

3 files changed

+44
-32
lines changed

3 files changed

+44
-32
lines changed

defaults.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ defaults:
8888
# GLOBAL POLICIES
8989
global:
9090
attachable_access_entity_profiles:
91+
access_or_native_vlan: null
92+
allowed_vlans: ''
9193
description: ''
94+
instrumentation_immediacy: on-demand
9295
l3_domains: []
9396
name: '**REQUIRED**'
9497
physical_domains: []

locals.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ locals {
9393

9494
attachable_access_entity_profiles = {
9595
for k, v in lookup(local.global, "attachable_access_entity_profiles", {}) : v.name => {
96+
access_or_native_vlan = lookup(v, "access_or_native_vlan", 0)
97+
allowed_vlans = lookup(v, "allowed_vlans", "")
9698
description = lookup(v, "description", local.aaep.description)
9799
domains = compact(concat(
98100
[for i in lookup(v, "l3_domains", []) : aci_l3_domain_profile.map["${i}"].id],

outputs.tf

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,38 @@
33
Interface — Outputs
44
_______________________________________________________________________________________________________________________
55
*/
6-
#output "interface" {
7-
# description = <<-EOT
8-
# Interface Identifiers
9-
# leaf_interfaces:
10-
# policy_groups
11-
# access: Fabric => Access Policies => Interfaces => Leaf Interfaces => Policy Groups => Leaf Access Port.
12-
# breakout: Fabric => Access Policies => Interfaces => Leaf Interfaces => Policy Groups => Leaf Breakout Port Group.
13-
# bundle: Fabric => Access Policies => Interfaces => Leaf Interfaces => Policy Groups => [ VPC Interface | VPC Interface ].
14-
# spine_interfaces:
15-
# policy_groups: Fabric => Access Policies => Interfaces => Spine Interfaces => Policy Groups
16-
# EOT
17-
# value = {
18-
# leaf_interfaces = {
19-
# policy_groups = {
20-
# access = {
21-
# for v in sort(keys(aci_leaf_access_port_policy_group.map)) : v => aci_leaf_access_port_policy_group.map[v].id
22-
# }
23-
# breakout = {
24-
# for v in sort(keys(aci_leaf_breakout_port_group.map)) : v => aci_leaf_breakout_port_group.map[v].id
25-
# }
26-
# bundle = {
27-
# for v in sort(keys(aci_leaf_access_bundle_policy_group.map)) : v => aci_leaf_access_bundle_policy_group.map[v].id
28-
# }
29-
# }
30-
# }
31-
# spine_interfaces = {
32-
# policy_groups = {
33-
# for v in sort(keys(aci_spine_port_policy_group.map)) : v => aci_spine_port_policy_group.map[v].id
34-
# }
35-
# }
36-
# }
37-
#}
6+
output "interface" {
7+
description = <<-EOT
8+
Interface Identifiers
9+
leaf_interfaces:
10+
policy_groups
11+
access: Fabric => Access Policies => Interfaces => Leaf Interfaces => Policy Groups => Leaf Access Port.
12+
breakout: Fabric => Access Policies => Interfaces => Leaf Interfaces => Policy Groups => Leaf Breakout Port Group.
13+
bundle: Fabric => Access Policies => Interfaces => Leaf Interfaces => Policy Groups => [ VPC Interface | VPC Interface ].
14+
spine_interfaces:
15+
policy_groups: Fabric => Access Policies => Interfaces => Spine Interfaces => Policy Groups
16+
EOT
17+
value = {
18+
leaf_interfaces = {
19+
policy_groups = {
20+
access = {
21+
for v in sort(keys(aci_leaf_access_port_policy_group.map)) : v => aci_leaf_access_port_policy_group.map[v].id
22+
}
23+
breakout = {
24+
for v in sort(keys(aci_leaf_breakout_port_group.map)) : v => aci_leaf_breakout_port_group.map[v].id
25+
}
26+
bundle = {
27+
for v in sort(keys(aci_leaf_access_bundle_policy_group.map)) : v => aci_leaf_access_bundle_policy_group.map[v].id
28+
}
29+
}
30+
}
31+
spine_interfaces = {
32+
policy_groups = {
33+
for v in sort(keys(aci_spine_port_policy_group.map)) : v => aci_spine_port_policy_group.map[v].id
34+
}
35+
}
36+
}
37+
}
3838

3939

4040
/*_____________________________________________________________________________________________________________________
@@ -81,6 +81,13 @@ output "global" {
8181
}
8282
}
8383

84+
output "aaep_to_epgs" {
85+
value = { for k, v in local.attachable_access_entity_profiles : k => {
86+
access_or_native_vlan = v.access_or_native_vlan
87+
allowed_vlans = v.allowed_vlans
88+
name = k
89+
}}
90+
}
8491

8592
/*_____________________________________________________________________________________________________________________
8693

0 commit comments

Comments
 (0)