@@ -48,23 +48,51 @@ GUI Location:
48
48
- Fabric > Access Policies > Policies > Global > DHCP Relay > {name}
49
49
_______________________________________________________________________________________________________________________
50
50
*/
51
- resource "aci_dhcp_relay_policy" "dhcp_relay" {
52
- for_each = local. dhcp_relay
53
- annotation = each. value . annotation
54
- description = each. value . description
55
- mode = each. value . mode
56
- name = each. key
57
- owner = " infra"
58
- tenant_dn = " uni/infra"
59
- relation_dhcp_rs_prov {
60
- addr = each. value . address
61
- tdn = length (
51
+ resource "aci_rest_managed" "dhcp_relay" {
52
+ for_each = local. dhcp_relay
53
+ class_name = " dhcpRelayP"
54
+ dn = " uni/infra/relayp-${ each . key } "
55
+ content = {
56
+ # annotation = each.value.annotation
57
+ descr = each.value.description
58
+ mode = each.value.mode
59
+ name = each.key
60
+ owner = " infra"
61
+ }
62
+ child {
63
+ rn = length (
62
64
regexall (" external_epg" , each. value . epg_type )
63
- ) > 0 ? " uni/tn-${ each . value . tenant } /out-${ each . value . l3out } /instP-${ each . value . epg } " : length (
65
+ ) > 0 ? " rsprov-[ uni/tn-${ each . value . tenant } /out-${ each . value . l3out } /instP-${ each . value . epg } ] " : length (
64
66
regexall (" application_epg" , each. value . epg_type )
65
- ) > 0 ? " uni/tn-${ each . value . tenant } /ap-${ each . value . application_profile } /epg-${ each . value . epg } " : " "
67
+ ) > 0 ? " rsprov-[uni/tn-${ each . value . tenant } /ap-${ each . value . application_profile } /epg-${ each . value . epg } ]" : " "
68
+ class_name = " dhcpRsProv"
69
+ content = {
70
+ addr = each.value.address
71
+ tDn = length (
72
+ regexall (" external_epg" , each. value . epg_type )
73
+ ) > 0 ? " uni/tn-${ each . value . tenant } /out-${ each . value . l3out } /instP-${ each . value . epg } " : length (
74
+ regexall (" application_epg" , each. value . epg_type )
75
+ ) > 0 ? " uni/tn-${ each . value . tenant } /ap-${ each . value . application_profile } /epg-${ each . value . epg } " : " "
76
+ }
66
77
}
67
78
}
79
+ # resource "aci_dhcp_relay_policy" "dhcp_relay" {
80
+ # for_each = local.dhcp_relay
81
+ # annotation = each.value.annotation
82
+ # description = each.value.description
83
+ # mode = each.value.mode
84
+ # name = each.key
85
+ # owner = "infra"
86
+ # tenant_dn = "uni/infra"
87
+ # relation_dhcp_rs_prov {
88
+ # addr = each.value.address
89
+ # tdn = length(
90
+ # regexall("external_epg", each.value.epg_type)
91
+ # ) > 0 ? "uni/tn-${each.value.tenant}/out-${each.value.l3out}/instP-${each.value.epg}" : length(
92
+ # regexall("application_epg", each.value.epg_type)
93
+ # ) > 0 ? "uni/tn-${each.value.tenant}/ap-${each.value.application_profile}/epg-${each.value.epg}" : ""
94
+ # }
95
+ # }
68
96
69
97
/* _____________________________________________________________________________________________________________________
70
98
0 commit comments