Skip to content

Commit 4e28ff4

Browse files
fix issue with ewlc provisioning
1 parent 790f0dc commit 4e28ff4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cc_device_provision.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ resource "catalystcenter_device_role" "role" {
122122
}
123123

124124
resource "catalystcenter_provision_device" "provision_device" {
125-
for_each = { for device in try(local.catalyst_center.inventory.devices, []) : device.name => device if strcontains(device.state, "PROVISION") && try(device.primary_managed_ap_locations, null) == null && !contains(try(device.fabric_roles, []), "WIRELESS_CONTROLLER_NODE") && !contains(try(device.fabric_roles, []), "EMBEDDED_WIRELESS_CONTROLLER_NODE") && contains(local.sites, try(device.site, "NONE")) && var.use_bulk_api == false && try(device.type, null) != "AccessPoint" }
125+
for_each = { for device in try(local.catalyst_center.inventory.devices, []) : device.name => device if strcontains(device.state, "PROVISION") && ((try(device.primary_managed_ap_locations, null) == null && !contains(try(device.fabric_roles, []), "WIRELESS_CONTROLLER_NODE") && !contains(try(device.fabric_roles, []), "EMBEDDED_WIRELESS_CONTROLLER_NODE")) || (try(device.primary_managed_ap_locations, null) != null && contains(try(device.fabric_roles, []), "EMBEDDED_WIRELESS_CONTROLLER_NODE"))) && contains(local.sites, try(device.site, "NONE")) && var.use_bulk_api == false && try(device.type, null) != "AccessPoint" }
126126

127127
site_id = try(local.site_id_list[each.value.site], null)
128128
network_device_id = try(local.device_name_to_id[each.value.name], local.device_name_to_id[each.value.fqdn_name], local.device_ip_to_id[each.value.device_ip])

cc_fabric.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,10 @@ resource "catalystcenter_fabric_device" "edge_device" {
383383
fabric_role
384384
], local.defaults.catalyst_center.inventory.devices.fabric_roles, null)
385385

386+
lifecycle {
387+
ignore_changes = [device_roles]
388+
}
389+
386390
depends_on = [catalystcenter_device_role.role, catalystcenter_provision_devices.provision_devices, catalystcenter_provision_device.provision_device, catalystcenter_fabric_device.border_device, catalystcenter_fabric_devices.fabric_devices, catalystcenter_fabric_ewlc.ewlc_device]
387391
}
388392

0 commit comments

Comments
 (0)