-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcc_wireless.tf
More file actions
391 lines (341 loc) · 46.6 KB
/
cc_wireless.tf
File metadata and controls
391 lines (341 loc) · 46.6 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
locals {
ssid_radio_type_mapping = {
"Triple Band" = "Triple band operation(2.4GHz, 5GHz and 6GHz)"
"5GHz" = "5GHz only"
"2.4GHz" = "2.4GHz only"
"6GHz" = "6GHz only"
"2.4GHz and 5GHz" = "2.4 and 5 GHz"
"2.4GHz and 6GHz" = "2.4 and 6 GHz"
"5GHz and 6GHz" = "5 and 6 GHz"
}
wireless_controllers = length({
for device in try(local.catalyst_center.inventory.devices, []) : device.name => device if strcontains(device.state, "PROVISION") && contains(try(device.fabric_roles, []), "WIRELESS_CONTROLLER_NODE")
}) > 0
# All dot11be profile names referenced in ssid_details
dot11be_profile_names_referenced = distinct(flatten([
for np in try(local.catalyst_center.network_profiles.wireless, []) : [
for ssid in try(np.ssid_details, []) : ssid.dot11be_profile_name
if try(ssid.dot11be_profile_name, null) != null
]
]))
# Profile names defined in YAML (will be managed by Terraform)
dot11be_profile_names_managed = [for profile in try(local.catalyst_center.wireless.dot11be_profiles, []) : profile.name]
# Profile names that are referenced but NOT defined in YAML (need to look up existing profiles)
dot11be_profile_names_existing = [
for name in local.dot11be_profile_names_referenced : name
if !contains(local.dot11be_profile_names_managed, name)
]
}
# Create 802.11be profiles from YAML configuration
resource "catalystcenter_dot11be_profile" "dot11be_profile" {
for_each = { for profile in try(local.catalyst_center.wireless.dot11be_profiles, []) : profile.name => profile if var.manage_global_settings || (!var.manage_global_settings && length(var.managed_sites) == 0) }
profile_name = each.key
ofdma_down_link = try(each.value.ofdma_down_link, local.defaults.catalyst_center.wireless.dot11be_profiles.ofdma_down_link, null)
ofdma_up_link = try(each.value.ofdma_up_link, local.defaults.catalyst_center.wireless.dot11be_profiles.ofdma_up_link, null)
mu_mimo_down_link = try(each.value.mu_mimo_down_link, local.defaults.catalyst_center.wireless.dot11be_profiles.mu_mimo_down_link, null)
mu_mimo_up_link = try(each.value.mu_mimo_up_link, local.defaults.catalyst_center.wireless.dot11be_profiles.mu_mimo_up_link, null)
ofdma_multi_ru = try(each.value.ofdma_multi_ru, local.defaults.catalyst_center.wireless.dot11be_profiles.ofdma_multi_ru, null)
}
# Look up existing 802.11be profiles (created outside of Terraform)
data "catalystcenter_dot11be_profile" "dot11be_profile" {
for_each = toset(local.dot11be_profile_names_existing)
profile_name = each.key
}
# Create AP Profiles from YAML configuration
resource "catalystcenter_ap_profile" "ap_profile" {
for_each = { for profile in try(local.catalyst_center.wireless.ap_profiles, []) : profile.name => profile if var.manage_global_settings || (!var.manage_global_settings && length(var.managed_sites) == 0) }
# Basic settings
ap_profile_name = each.key
description = try(each.value.description, local.defaults.catalyst_center.wireless.ap_profiles.description, null)
remote_worker_enabled = try(each.value.remote_worker_enabled, local.defaults.catalyst_center.wireless.ap_profiles.remote_worker_enabled, null)
# Management settings
auth_type = try(each.value.auth_type, local.defaults.catalyst_center.wireless.ap_profiles.auth_type, null)
dot1x_username = try(each.value.dot1x_username, local.defaults.catalyst_center.wireless.ap_profiles.dot1x_username, null)
dot1x_password = try(each.value.dot1x_password, local.defaults.catalyst_center.wireless.ap_profiles.dot1x_password, null)
ssh_enabled = try(each.value.ssh_enabled, local.defaults.catalyst_center.wireless.ap_profiles.ssh_enabled, null)
telnet_enabled = try(each.value.telnet_enabled, local.defaults.catalyst_center.wireless.ap_profiles.telnet_enabled, null)
management_user_name = try(each.value.management_user_name, local.defaults.catalyst_center.wireless.ap_profiles.management_user_name, null)
management_password = try(each.value.management_password, local.defaults.catalyst_center.wireless.ap_profiles.management_password, null)
management_enable_password = try(each.value.management_enable_password, local.defaults.catalyst_center.wireless.ap_profiles.management_enable_password, null)
cdp_state = try(each.value.cdp_state, local.defaults.catalyst_center.wireless.ap_profiles.cdp_state, null)
# AWIPS settings
awips_enabled = try(each.value.awips_enabled, local.defaults.catalyst_center.wireless.ap_profiles.awips_enabled, null)
awips_forensic_enabled = try(each.value.awips_forensic_enabled, local.defaults.catalyst_center.wireless.ap_profiles.awips_forensic_enabled, null)
# Rogue detection settings
rogue_detection = try(each.value.rogue_detection, local.defaults.catalyst_center.wireless.ap_profiles.rogue_detection, null)
rogue_detection_min_rssi = try(each.value.rogue_detection_min_rssi, local.defaults.catalyst_center.wireless.ap_profiles.rogue_detection_min_rssi, null)
rogue_detection_transient_interval = try(each.value.rogue_detection_transient_interval, local.defaults.catalyst_center.wireless.ap_profiles.rogue_detection_transient_interval, null)
rogue_detection_report_interval = try(each.value.rogue_detection_report_interval, local.defaults.catalyst_center.wireless.ap_profiles.rogue_detection_report_interval, null)
# PMF denial
pmf_denial_enabled = try(each.value.pmf_denial_enabled, local.defaults.catalyst_center.wireless.ap_profiles.pmf_denial_enabled, null)
# Mesh settings
mesh_enabled = try(each.value.mesh_enabled, local.defaults.catalyst_center.wireless.ap_profiles.mesh_enabled, null)
bridge_group_name = try(each.value.bridge_group_name, local.defaults.catalyst_center.wireless.ap_profiles.bridge_group_name, null)
backhaul_client_access = try(each.value.backhaul_client_access, local.defaults.catalyst_center.wireless.ap_profiles.backhaul_client_access, null)
range = try(each.value.range, local.defaults.catalyst_center.wireless.ap_profiles.range, null)
ghz5_backhaul_data_rates = try(each.value.ghz5_backhaul_data_rates, local.defaults.catalyst_center.wireless.ap_profiles.ghz5_backhaul_data_rates, null)
ghz24_backhaul_data_rates = try(each.value.ghz24_backhaul_data_rates, local.defaults.catalyst_center.wireless.ap_profiles.ghz24_backhaul_data_rates, null)
rap_downlink_backhaul = try(each.value.rap_downlink_backhaul, local.defaults.catalyst_center.wireless.ap_profiles.rap_downlink_backhaul, null)
# Power profile settings
ap_power_profile_name = try(each.value.ap_power_profile_name, local.defaults.catalyst_center.wireless.ap_profiles.ap_power_profile_name, null)
calendar_power_profiles = try([for cpp in each.value.calendar_power_profiles : {
power_profile_name = cpp.power_profile_name
scheduler_type = cpp.scheduler_type
scheduler_start_time = cpp.scheduler_start_time
scheduler_end_time = cpp.scheduler_end_time
scheduler_day = try(cpp.scheduler_day, null)
scheduler_date = try(cpp.scheduler_date, null)
}], null)
# Country and timezone settings
country_code = try(each.value.country_code, local.defaults.catalyst_center.wireless.ap_profiles.country_code, null)
time_zone = try(each.value.time_zone, local.defaults.catalyst_center.wireless.ap_profiles.time_zone, null)
time_zone_offset_hour = try(each.value.time_zone_offset_hour, local.defaults.catalyst_center.wireless.ap_profiles.time_zone_offset_hour, null)
time_zone_offset_minutes = try(each.value.time_zone_offset_minutes, local.defaults.catalyst_center.wireless.ap_profiles.time_zone_offset_minutes, null)
# Client limit
client_limit = try(each.value.client_limit, local.defaults.catalyst_center.wireless.ap_profiles.client_limit, null)
}
data "catalystcenter_wireless_profile" "wireless_profile" {
for_each = { for wireless_profile in try(local.catalyst_center.network_profiles.wireless, []) : wireless_profile.name => wireless_profile if var.manage_global_settings == false && length(var.managed_sites) != 0 }
wireless_profile_name = each.key
}
resource "catalystcenter_wireless_ssid" "ssid" {
for_each = { for ssid in try(local.catalyst_center.wireless.ssids, []) : ssid.name => ssid if var.manage_global_settings || (!var.manage_global_settings && length(var.managed_sites) == 0) }
ssid = each.key
auth_type = try(each.value.auth_type, local.defaults.catalyst_center.wireless.ssids.auth_type, null) == "OPEN_SECURED" ? "OPEN-SECURED" : try(each.value.auth_type, local.defaults.catalyst_center.wireless.ssids.auth_type, null)
wlan_type = try(each.value.wlan_type, local.defaults.catalyst_center.wireless.ssids.wlan_type, null)
site_id = try(data.catalystcenter_site.global.id, null)
aaa_override = try(each.value.aaa_override, local.defaults.catalyst_center.wireless.ssids.aaa_override, null)
acct_servers = try(each.value.acct_servers, local.defaults.catalyst_center.wireless.ssids.acct_servers, null)
auth_servers = try(each.value.auth_servers, local.defaults.catalyst_center.wireless.ssids.auth_servers, null)
acl_name = try(each.value.acl_name, local.defaults.catalyst_center.wireless.ssids.acl_name, null)
ap_beacon_protection = try(each.value.ap_beacon_protection, local.defaults.catalyst_center.wireless.ssids.ap_beacon_protection, null)
auth_key8021x = try(each.value.auth_key8021x, local.defaults.catalyst_center.wireless.ssids.auth_key8021x, null)
auth_key8021x_plus_ft = try(each.value.auth_key8021x_plus_ft, local.defaults.catalyst_center.wireless.ssids.auth_key8021x_plus_ft, null)
auth_key8021x_sha256 = try(each.value.auth_key8021x_sha256, local.defaults.catalyst_center.wireless.ssids.auth_key8021x_sha256, null)
auth_key_easy_psk = try(each.value.auth_key_easy_psk, local.defaults.catalyst_center.wireless.ssids.auth_key_easy_psk, null)
auth_key_easy_psk_sha256 = try(each.value.auth_key_easy_psk_sha256, local.defaults.catalyst_center.wireless.ssids.auth_key_easy_psk_sha256, null)
auth_key_owe = try(each.value.auth_key_owe, local.defaults.catalyst_center.wireless.ssids.auth_key_owe, null)
auth_key_psk = try(each.value.auth_key_psk, local.defaults.catalyst_center.wireless.ssids.auth_key_psk, null)
auth_key_psk_plus_ft = try(each.value.auth_key_psk_plus_ft, local.defaults.catalyst_center.wireless.ssids.auth_key_psk_plus_ft, null)
auth_key_sae = try(each.value.auth_key_sae, local.defaults.catalyst_center.wireless.ssids.auth_key_sae, null)
auth_key_sae_ext = try(each.value.auth_key_sae_ext, local.defaults.catalyst_center.wireless.ssids.auth_key_sae_ext, null)
auth_key_sae_ext_plus_ft = try(each.value.auth_key_sae_ext_plus_ft, local.defaults.catalyst_center.wireless.ssids.auth_key_sae_ext_plus_ft, null)
auth_key_sae_plus_ft = try(each.value.auth_key_sae_plus_ft, local.defaults.catalyst_center.wireless.ssids.auth_key_sae_plus_ft, null)
auth_key_suite_b1921x = try(each.value.auth_key_suite_b1921x, local.defaults.catalyst_center.wireless.ssids.auth_key_suite_b1921x, null)
auth_key_suite_b1x = try(each.value.auth_key_suite_b1x, local.defaults.catalyst_center.wireless.ssids.auth_key_suite_b1x, null)
auth_server = try(each.value.auth_server, local.defaults.catalyst_center.wireless.ssids.auth_server, null)
basic_service_set_max_idle = try(each.value.basic_service_set_max_idle, local.defaults.catalyst_center.wireless.ssids.basic_service_set_max_idle, null)
basic_service_set_client_idle_timeout = try(each.value.basic_service_set_client_idle_timeout, local.defaults.catalyst_center.wireless.ssids.basic_service_set_client_idle_timeout, null)
broadcast_ssid = try(each.value.broadcast_ssid, local.defaults.catalyst_center.wireless.ssids.broadcast_ssid, null)
cckm = try(each.value.cckm, local.defaults.catalyst_center.wireless.ssids.cckm, null)
cckm_tsf_tolerance = try(each.value.cckm_tsf_tolerance, 0) == 0 ? null : try(each.value.cckm_tsf_tolerance, local.defaults.catalyst_center.wireless.ssids.cckm_tsf_tolerance, null)
client_exclusion = try(each.value.client_exclusion, local.defaults.catalyst_center.wireless.ssids.client_exclusion, null)
client_exclusion_timeout = try(each.value.client_exclusion_timeout, local.defaults.catalyst_center.wireless.enterprise_ssids.client_exclusion_timeout, null)
client_rate_limit = try(each.value.client_rate_limit, 0) == 0 ? null : try(each.value.client_rate_limit, local.defaults.catalyst_center.wireless.ssids.client_rate_limit, null)
coverage_hole_detection = try(each.value.coverage_hole_detection, local.defaults.catalyst_center.wireless.ssids.coverage_hole_detection, null)
directed_multicast_service = try(each.value.directed_multicast_service, local.defaults.catalyst_center.wireless.ssids.directed_multicast_service, null)
egress_qos = try(each.value.egress_qos, local.defaults.catalyst_center.wireless.ssids.egress_qos, null)
enabled = try(each.value.enabled, local.defaults.catalyst_center.wireless.ssids.enabled, null)
external_auth_ip_address = try(each.value.external_auth_ip_address, local.defaults.catalyst_center.wireless.ssids.external_auth_ip_address, null)
fast_lane = try(each.value.fast_lane, local.defaults.catalyst_center.wireless.ssids.fast_lane, null)
fast_transition = try(each.value.fast_transition, local.defaults.catalyst_center.wireless.ssids.fast_transition, null)
fast_transition_over_the_distributed_system = try(each.value.fast_transition_over_the_distributed_system, local.defaults.catalyst_center.wireless.ssids.fast_transition_over_the_distributed_system, null)
ghz24_policy = try(each.value.ghz24_policy, local.defaults.catalyst_center.wireless.ssids.ghz24_policy, null)
ghz6_policy_client_steering = try(each.value.ghz6_policy_client_steering, local.defaults.catalyst_center.wireless.ssids.ghz6_policy_client_steering, null)
hex = try(each.value.hex, local.defaults.catalyst_center.wireless.ssids.hex, null)
ingress_qos = try(each.value.ingress_qos, local.defaults.catalyst_center.wireless.ssids.ingress_qos, null)
l3_auth_type = try(each.value.l3_auth_type, local.defaults.catalyst_center.wireless.ssids.l3_auth_type, null)
mac_filtering = try(each.value.mac_filtering, local.defaults.catalyst_center.wireless.ssids.mac_filtering, null)
mft_client_protection = try(each.value.mft_client_protection, local.defaults.catalyst_center.wireless.ssids.mft_client_protection, null)
multi_psk_settings = try(each.value.multi_psk_settings, local.defaults.catalyst_center.wireless.ssids.multi_psk_settings, null)
nas_options = try(each.value.nas_options, local.defaults.catalyst_center.wireless.ssids.nas_options, null)
neighbor_list = try(each.value.neighbor_list, local.defaults.catalyst_center.wireless.ssids.neighbor_list, null)
open_ssid = try(each.value.open_ssid, local.defaults.catalyst_center.wireless.ssids.open_ssid, null)
passphrase = try(each.value.passphrase, local.defaults.catalyst_center.wireless.ssids.passphrase, null)
posturing = try(each.value.posturing, local.defaults.catalyst_center.wireless.ssids.posturing, null)
profile_name = try(each.value.profile_name, local.defaults.catalyst_center.wireless.ssids.profile_name, null)
protected_management_frame = try(each.value.protected_management_frame, local.defaults.catalyst_center.wireless.ssids.protected_management_frame, null)
random_mac_filter = try(each.value.random_mac_filter, local.defaults.catalyst_center.wireless.ssids.random_mac_filter, null)
rsn_cipher_suite_ccmp128 = try(each.value.rsn_cipher_suite_ccmp128, local.defaults.catalyst_center.wireless.ssids.rsn_cipher_suite_ccmp128, null)
rsn_cipher_suite_gcmp128 = try(each.value.rsn_cipher_suite_gcmp128, local.defaults.catalyst_center.wireless.ssids.rsn_cipher_suite_gcmp128, null)
rsn_cipher_suite_ccmp256 = try(each.value.rsn_cipher_suite_ccmp256, local.defaults.catalyst_center.wireless.ssids.rsn_cipher_suite_ccmp256, null)
rsn_cipher_suite_gcmp256 = try(each.value.rsn_cipher_suite_gcmp256, local.defaults.catalyst_center.wireless.ssids.rsn_cipher_suite_gcmp256, null)
session_timeout = try(each.value.session_timeout, 0) == 0 ? null : try(each.value.session_timeout, local.defaults.catalyst_center.wireless.ssids.session_timeout, null)
session_timeout_enable = try(each.value.session_timeout_enable, local.defaults.catalyst_center.wireless.ssids.session_timeout_enable, null)
sleeping_client = try(each.value.sleeping_client, local.defaults.catalyst_center.wireless.ssids.sleeping_client, null)
sleeping_client_timeout = try(each.value.sleeping_client_timeout, local.defaults.catalyst_center.wireless.ssids.sleeping_client_timeout, null)
ssid_radio_type = try(local.ssid_radio_type_mapping[each.value.ssid_radio_type], local.defaults.catalyst_center.wireless.ssids.ssid_radio_type, null)
web_passthrough = try(each.value.web_passthrough, local.defaults.catalyst_center.wireless.ssids.web_passthrough, null)
wlan_band_select = try(each.value.wlan_band_select, local.defaults.catalyst_center.wireless.ssids.wlan_band_select, null)
}
resource "catalystcenter_wireless_rf_profile" "rf_profile" {
for_each = { for rf_profile in try(local.catalyst_center.wireless.rf_profiles, []) : rf_profile.name => rf_profile if var.manage_global_settings || (!var.manage_global_settings && length(var.managed_sites) == 0) }
rf_profile_name = each.key
default_rf_profile = try(each.value.default_rf_profile, local.defaults.catalyst_center.wireless.rf_profiles.default_rf_profile, null)
enable_radio_type_a = try(each.value.enable_radio_type_a, local.defaults.catalyst_center.wireless.rf_profiles.enable_radio_type_a, null)
enable_radio_type_b = try(each.value.enable_radio_type_b, local.defaults.catalyst_center.wireless.rf_profiles.enable_radio_type_b, null)
enable_radio_type6_g_hz = try(each.value.enable_radio_type_c, local.defaults.catalyst_center.wireless.rf_profiles.enable_radio_type_c, null)
# Radio Type A Properties (5 GHz)
radio_type_a_parent_profile = try(each.value.radio_type_a_properties.parent_profile, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.parent_profile, null)
radio_type_a_radio_channels = try(each.value.radio_type_a_properties.radio_channels, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.radio_channels, null)
radio_type_a_data_rates = try(each.value.radio_type_a_properties.data_rates, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.data_rates, null)
radio_type_a_mandatory_data_rates = try(each.value.radio_type_a_properties.mandatory_data_rates, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.mandatory_data_rates, null)
radio_type_a_power_threshold_v1 = try(each.value.radio_type_a_properties.power_threshold_v1, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.power_threshold_v1, null)
radio_type_a_rx_sop_threshold = try(each.value.radio_type_a_properties.rx_sop_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.rx_sop_threshold, null)
radio_type_a_min_power_level = try(each.value.radio_type_a_properties.min_power_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.min_power_level, null)
radio_type_a_max_power_level = try(each.value.radio_type_a_properties.max_power_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.max_power_level, null)
radio_type_a_channel_width = try(each.value.radio_type_a_properties.channel_width, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.channel_width, null)
radio_type_a_preamble_puncture = try(each.value.radio_type_a_properties.preamble_puncture, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.preamble_puncture, null)
radio_type_a_zero_wait_dfs_enable = try(each.value.radio_type_a_properties.zero_wait_dfs_enable, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.zero_wait_dfs_enable, null)
radio_type_a_custom_rx_sop_threshold = try(each.value.radio_type_a_properties.custom_rx_sop_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.custom_rx_sop_threshold, null)
radio_type_a_max_radio_clients = try(each.value.radio_type_a_properties.max_radio_clients, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.max_radio_clients, null)
# Radio Type A FRA Properties (5 GHz)
radio_type_a_fra_properties_client_aware = try(each.value.radio_type_a_properties.fra_properties_a.client_aware, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.fra_properties_a.client_aware, null)
radio_type_a_fra_properties_client_select = try(each.value.radio_type_a_properties.fra_properties_a.client_select, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.fra_properties_a.client_select, null)
radio_type_a_fra_properties_client_reset = try(each.value.radio_type_a_properties.fra_properties_a.client_reset, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.fra_properties_a.client_reset, null)
# Radio Type A Coverage Hole Detection Properties (5 GHz)
radio_type_a_coverage_hole_detection_properties_chd_client_level = try(each.value.radio_type_a_properties.coverage_hole_detection_properties.chd_client_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.coverage_hole_detection_properties.chd_client_level, null)
radio_type_a_coverage_hole_detection_properties_chd_data_rssi_threshold = try(each.value.radio_type_a_properties.coverage_hole_detection_properties.chd_data_rssi_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.coverage_hole_detection_properties.chd_data_rssi_threshold, null)
radio_type_a_coverage_hole_detection_properties_chd_voice_rssi_threshold = try(each.value.radio_type_a_properties.coverage_hole_detection_properties.chd_voice_rssi_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.coverage_hole_detection_properties.chd_voice_rssi_threshold, null)
radio_type_a_coverage_hole_detection_properties_chd_exception_level = try(each.value.radio_type_a_properties.coverage_hole_detection_properties.chd_exception_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.coverage_hole_detection_properties.chd_exception_level, null)
# Radio Type A Spatial Reuse Properties (5 GHz)
radio_type_a_spatial_reuse_properties_dot11ax_non_srg_obss_packet_detect = try(each.value.radio_type_a_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect, null)
radio_type_a_spatial_reuse_properties_dot11ax_non_srg_obss_packet_detect_max_threshold = try(each.value.radio_type_a_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect_max_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect_max_threshold, null)
radio_type_a_spatial_reuse_properties_dot11ax_srg_obss_packet_detect = try(each.value.radio_type_a_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect, null)
radio_type_a_spatial_reuse_properties_dot11ax_srg_obss_packet_detect_min_threshold = try(each.value.radio_type_a_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_min_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_min_threshold, null)
radio_type_a_spatial_reuse_properties_dot11ax_srg_obss_packet_detect_max_threshold = try(each.value.radio_type_a_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_max_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_a_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_max_threshold, null)
# Radio Type B Properties (2.4 GHz)
radio_type_b_parent_profile = try(each.value.radio_type_b_properties.parent_profile, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.parent_profile, null)
radio_type_b_radio_channels = try(each.value.radio_type_b_properties.radio_channels, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.radio_channels, null)
radio_type_b_data_rates = try(each.value.radio_type_b_properties.data_rates, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.data_rates, null)
radio_type_b_mandatory_data_rates = try(each.value.radio_type_b_properties.mandatory_data_rates, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.mandatory_data_rates, null)
radio_type_b_power_threshold_v1 = try(each.value.radio_type_b_properties.power_threshold_v1, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.power_threshold_v1, null)
radio_type_b_rx_sop_threshold = try(each.value.radio_type_b_properties.rx_sop_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.rx_sop_threshold, null)
radio_type_b_min_power_level = try(each.value.radio_type_b_properties.min_power_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.min_power_level, null)
radio_type_b_max_power_level = try(each.value.radio_type_b_properties.max_power_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.max_power_level, null)
radio_type_b_custom_rx_sop_threshold = try(each.value.radio_type_b_properties.custom_rx_sop_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.custom_rx_sop_threshold, null)
radio_type_b_max_radio_clients = try(each.value.radio_type_b_properties.max_radio_clients, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.max_radio_clients, null)
# Radio Type B Coverage Hole Detection Properties (2.4 GHz)
radio_type_b_coverage_hole_detection_properties_chd_client_level = try(each.value.radio_type_b_properties.coverage_hole_detection_properties.chd_client_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.coverage_hole_detection_properties.chd_client_level, null)
radio_type_b_coverage_hole_detection_properties_chd_data_rssi_threshold = try(each.value.radio_type_b_properties.coverage_hole_detection_properties.chd_data_rssi_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.coverage_hole_detection_properties.chd_data_rssi_threshold, null)
radio_type_b_coverage_hole_detection_properties_chd_voice_rssi_threshold = try(each.value.radio_type_b_properties.coverage_hole_detection_properties.chd_voice_rssi_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.coverage_hole_detection_properties.chd_voice_rssi_threshold, null)
radio_type_b_coverage_hole_detection_properties_chd_exception_level = try(each.value.radio_type_b_properties.coverage_hole_detection_properties.chd_exception_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.coverage_hole_detection_properties.chd_exception_level, null)
# Radio Type B Spatial Reuse Properties (2.4 GHz)
radio_type_b_spatial_reuse_properties_dot11ax_non_srg_obss_packet_detect = try(each.value.radio_type_b_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect, null)
radio_type_b_spatial_reuse_properties_dot11ax_non_srg_obss_packet_detect_max_threshold = try(each.value.radio_type_b_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect_max_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect_max_threshold, null)
radio_type_b_spatial_reuse_properties_dot11ax_srg_obss_packet_detect = try(each.value.radio_type_b_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect, null)
radio_type_b_spatial_reuse_properties_dot11ax_srg_obss_packet_detect_min_threshold = try(each.value.radio_type_b_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_min_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_min_threshold, null)
radio_type_b_spatial_reuse_properties_dot11ax_srg_obss_packet_detect_max_threshold = try(each.value.radio_type_b_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_max_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_b_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_max_threshold, null)
# Radio Type C (6 GHz) Properties
radio_type_c_parent_profile = try(each.value.radio_type_c_properties.parent_profile, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.parent_profile, null)
radio_type_c_radio_channels = try(each.value.radio_type_c_properties.radio_channels, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.radio_channels, null)
radio_type_c_data_rates = try(each.value.radio_type_c_properties.data_rates, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.data_rates, null)
radio_type_c_mandatory_data_rates = try(each.value.radio_type_c_properties.mandatory_data_rates, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.mandatory_data_rates, null)
radio_type_c_power_threshold_v1 = try(each.value.radio_type_c_properties.power_threshold_v1, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.power_threshold_v1, null)
radio_type_c_rx_sop_threshold = try(each.value.radio_type_c_properties.rx_sop_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.rx_sop_threshold, null)
radio_type_c_min_power_level = try(each.value.radio_type_c_properties.min_power_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.min_power_level, null)
radio_type_c_max_power_level = try(each.value.radio_type_c_properties.max_power_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.max_power_level, null)
radio_type_c_enable_standard_power_service = try(each.value.radio_type_c_properties.enable_standard_power_service, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.enable_standard_power_service, null)
radio_type_c_custom_rx_sop_threshold = try(each.value.radio_type_c_properties.custom_rx_sop_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.custom_rx_sop_threshold, null)
radio_type_c_max_radio_clients = try(each.value.radio_type_c_properties.max_radio_clients, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.max_radio_clients, null)
# Radio Type C Multi-BSSID Properties - 802.11ax Parameters
radio_type_c_multi_bssid_properties_dot11ax_parameters_ofdma_down_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.ofdma_down_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.ofdma_down_link, null)
radio_type_c_multi_bssid_properties_dot11ax_parameters_ofdma_up_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.ofdma_up_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.ofdma_up_link, null)
radio_type_c_multi_bssid_properties_dot11ax_parameters_mu_mimo_up_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.mu_mimo_up_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.mu_mimo_up_link, null)
radio_type_c_multi_bssid_properties_dot11ax_parameters_mu_mimo_down_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.mu_mimo_down_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11ax_parameters.mu_mimo_down_link, null)
# Radio Type C Multi-BSSID Properties - 802.11be Parameters
radio_type_c_multi_bssid_properties_dot11be_parameters_ofdma_down_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.ofdma_down_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.ofdma_down_link, null)
radio_type_c_multi_bssid_properties_dot11be_parameters_ofdma_up_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.ofdma_up_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.ofdma_up_link, null)
radio_type_c_multi_bssid_properties_dot11be_parameters_mu_mimo_up_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.mu_mimo_up_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.mu_mimo_up_link, null)
radio_type_c_multi_bssid_properties_dot11be_parameters_mu_mimo_down_link = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.mu_mimo_down_link, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.mu_mimo_down_link, null)
radio_type_c_multi_bssid_properties_dot11be_parameters_ofdma_multi_ru = try(each.value.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.ofdma_multi_ru, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.dot11be_parameters.ofdma_multi_ru, null)
# Radio Type C Multi-BSSID Properties - Target Wake Time and TWT Broadcast Support
radio_type_c_multi_bssid_properties_target_wake_time = try(each.value.radio_type_c_properties.multi_bssid_properties.target_wake_time, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.target_wake_time, null)
radio_type_c_multi_bssid_properties_twt_broadcast_support = try(each.value.radio_type_c_properties.multi_bssid_properties.twt_broadcast_support, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.multi_bssid_properties.twt_broadcast_support, null)
# Radio Type C Additional Properties
radio_type_c_preamble_puncture = try(each.value.radio_type_c_properties.preamble_puncture, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.preamble_puncture, null)
radio_type_c_min_dbs_width = try(each.value.radio_type_c_properties.min_dbs_width, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.min_dbs_width, null)
radio_type_c_max_dbs_width = try(each.value.radio_type_c_properties.max_dbs_width, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.max_dbs_width, null)
radio_type_c_psc_enforcing_enabled = try(each.value.radio_type_c_properties.psc_enforcing_enabled, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.psc_enforcing_enabled, null)
radio_type_c_discovery_frames_6ghz = try(each.value.radio_type_c_properties.discovery_frames_6ghz, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.discovery_frames_6ghz, null)
radio_type_c_broadcast_probe_response_interval = try(each.value.radio_type_c_properties.broadcast_probe_response_interval, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.broadcast_probe_response_interval, null)
# Radio Type C FRA Properties
radio_type_c_fra_properties_client_reset_count = try(each.value.radio_type_c_properties.fra_properties_c.client_reset_count, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.fra_properties_c.client_reset_count, null)
radio_type_c_fra_properties_client_utilization_threshold = try(each.value.radio_type_c_properties.fra_properties_c.client_utilization_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.fra_properties_c.client_utilization_threshold, null)
# Radio Type C Coverage Hole Detection Properties
radio_type_c_coverage_hole_detection_properties_chd_client_level = try(each.value.radio_type_c_properties.coverage_hole_detection_properties.chd_client_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.coverage_hole_detection_properties.chd_client_level, null)
radio_type_c_coverage_hole_detection_properties_chd_data_rssi_threshold = try(each.value.radio_type_c_properties.coverage_hole_detection_properties.chd_data_rssi_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.coverage_hole_detection_properties.chd_data_rssi_threshold, null)
radio_type_c_coverage_hole_detection_properties_chd_voice_rssi_threshold = try(each.value.radio_type_c_properties.coverage_hole_detection_properties.chd_voice_rssi_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.coverage_hole_detection_properties.chd_voice_rssi_threshold, null)
radio_type_c_coverage_hole_detection_properties_chd_exception_level = try(each.value.radio_type_c_properties.coverage_hole_detection_properties.chd_exception_level, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.coverage_hole_detection_properties.chd_exception_level, null)
# Radio Type C Spatial Reuse Properties (6 GHz)
radio_type_c_spatial_reuse_properties_dot11ax_non_srg_obss_packet_detect = try(each.value.radio_type_c_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect, null)
radio_type_c_spatial_reuse_properties_dot11ax_non_srg_obss_packet_detect_max_threshold = try(each.value.radio_type_c_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect_max_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.spatial_reuse_properties.dot11ax_non_srg_obss_packet_detect_max_threshold, null)
radio_type_c_spatial_reuse_properties_dot11ax_srg_obss_packet_detect = try(each.value.radio_type_c_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect, null)
radio_type_c_spatial_reuse_properties_dot11ax_srg_obss_packet_detect_min_threshold = try(each.value.radio_type_c_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_min_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_min_threshold, null)
radio_type_c_spatial_reuse_properties_dot11ax_srg_obss_packet_detect_max_threshold = try(each.value.radio_type_c_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_max_threshold, local.defaults.catalyst_center.wireless.rf_profiles.radio_type_c_properties.spatial_reuse_properties.dot11ax_srg_obss_packet_detect_max_threshold, null)
depends_on = [catalystcenter_wireless_ssid.ssid]
}
resource "catalystcenter_wireless_profile" "wireless_profile" {
for_each = { for wireless_profile in try(local.catalyst_center.network_profiles.wireless, []) : wireless_profile.name => wireless_profile if var.manage_global_settings || (!var.manage_global_settings && length(var.managed_sites) == 0) }
wireless_profile_name = each.key
ssid_details = try([for ssid in each.value.ssid_details : {
ssid_name = try(ssid.name, null)
enable_fabric = try(ssid.enable_fabric, local.defaults.catalyst_center.network_profiles.wireless.ssid_details.enable_fabric, null)
enable_flex_connect = try(ssid.enable_flex_connect, local.defaults.catalyst_center.network_profiles.wireless.ssid_details.enable_flex_connect, null)
local_to_vlan = try(ssid.enable_flex_connect, local.defaults.catalyst_center.network_profiles.wireless.ssid_details.enable_flex_connect, false) == true ? try(ssid.local_to_vlan, local.defaults.catalyst_center.network_profiles.wireless.ssid_details.local_to_vlan, null) : null
interface_name = try(ssid.enable_fabric, false) == false ? try(ssid.interface_name, local.defaults.catalyst_center.network_profiles.wireless.ssid_details.interface_name, null) : null
wlan_profile_name = try(ssid.wlan_profile_name, local.defaults.catalyst_center.network_profiles.wireless.ssid_details.wlan_profile_name, null)
# Direct reference to ensure proper dependency tracking - try managed resource first, then data source
dot11be_profile_id = try(ssid.dot11be_profile_name, null) != null ? try(
catalystcenter_dot11be_profile.dot11be_profile[ssid.dot11be_profile_name].id,
data.catalystcenter_dot11be_profile.dot11be_profile[ssid.dot11be_profile_name].id,
null
) : null
}], null)
additional_interfaces = try(each.value.additional_interfaces, null)
ap_zones = try([for ap_zone in each.value.ap_zones : {
ap_zone_name = try(ap_zone.name, local.defaults.catalyst_center.network_profiles.wireless.ap_zones.name, null)
rf_profile_name = try(ap_zone.rf_profile_name, local.defaults.catalyst_center.network_profiles.wireless.ap_zones.rf_profile_name, null)
ssids = try(ap_zone.ssids, local.defaults.catalyst_center.network_profiles.wireless.ap_zones.ssids, [])
}], null)
depends_on = [catalystcenter_wireless_ssid.ssid, catalystcenter_wireless_interface.interface, catalystcenter_wireless_rf_profile.rf_profile, catalystcenter_dot11be_profile.dot11be_profile]
}
resource "catalystcenter_network_profile_for_sites_assignments" "site_to_wireless_network_profile" {
for_each = { for np in try(local.catalyst_center.network_profiles.wireless, []) : np.name => np if length(try(np.sites, [])) > 0 && anytrue([for site in np.sites : contains(local.sites, site)]) }
network_profile_id = try(catalystcenter_wireless_profile.wireless_profile[each.key].id, data.catalystcenter_wireless_profile.wireless_profile[each.key].id)
items = [
for site in each.value.sites : {
id = var.use_bulk_api ? coalesce(try(local.site_id_list_bulk[site], null), local.data_source_created_sites_list[site]) : local.site_id_list[site]
} if contains(local.sites, site) && (var.use_bulk_api ? try(local.data_source_created_sites_list[site], null) != null : try(local.site_id_list[site], null) != null)
]
}
locals {
wireless_profile_site_tags = merge([
for np in try(local.catalyst_center.network_profiles.wireless, []) : {
for tag in try(np.site_tags, []) : "${np.name}/${tag.name}" => merge(tag, {
wireless_profile_name = np.name
})
}
]...)
}
resource "catalystcenter_wireless_profile_site_tag" "site_tag" {
for_each = {
for key, tag in local.wireless_profile_site_tags : key => tag
if length(try(tag.sites, [])) > 0 && anytrue([for site in tag.sites : contains(local.sites, site)])
}
wireless_profile_id = try(catalystcenter_wireless_profile.wireless_profile[each.value.wireless_profile_name].id, data.catalystcenter_wireless_profile.wireless_profile[each.value.wireless_profile_name].id)
site_tag_name = each.value.name
ap_profile_name = try(each.value.ap_profile_name, local.defaults.catalyst_center.network_profiles.wireless.site_tags.ap_profile_name, null)
flex_profile_name = try(each.value.flex_profile_name, local.defaults.catalyst_center.network_profiles.wireless.site_tags.flex_profile_name, null)
site_ids = toset([
for site in each.value.sites :
var.use_bulk_api ? coalesce(try(local.site_id_list_bulk[site], null), local.data_source_created_sites_list[site]) : local.site_id_list[site]
if contains(local.sites, site) && (var.use_bulk_api ? try(local.data_source_created_sites_list[site], null) != null : try(local.site_id_list[site], null) != null)
])
depends_on = [catalystcenter_network_profile_for_sites_assignments.site_to_wireless_network_profile, catalystcenter_ap_profile.ap_profile]
}
resource "catalystcenter_wireless_interface" "interface" {
for_each = { for iface in try(local.catalyst_center.wireless.interfaces, []) : iface.name => iface if var.manage_global_settings || (!var.manage_global_settings && length(var.managed_sites) == 0) }
interface_name = try(each.value.name, local.defaults.catalyst_center.wireless.interfaces.name, null)
vlan_id = try(each.value.vlan_id, local.defaults.catalyst_center.wireless.interfaces.vlan_id, null)
}