@@ -280,8 +280,10 @@ resource "catalystcenter_fabric_device" "border_device" {
280280 try (lookup (local. device_name_to_id , each. value . fqdn_name , null ), null ),
281281 try (lookup (local. device_ip_to_id , each. value . device_ip , null ), null )
282282 )
283- fabric_id = try (catalystcenter_fabric_site. fabric_site [each . value . fabric_site ]. id , null )
284- device_roles = try (each. value . fabric_roles , local. defaults . catalyst_center . inventory . devices . fabric_roles , null )
283+ fabric_id = try (catalystcenter_fabric_site. fabric_site [each . value . fabric_site ]. id , null )
284+ device_roles = try ([
285+ for fabric_role in try (each. value . fabric_roles , []) : fabric_role if fabric_role != " EMBEDDED_WIRELESS_CONTROLLER_NODE"
286+ ], local. defaults . catalyst_center . inventory . devices . fabric_roles , null )
285287 border_types = try (local. border_devices [each . key ]. border_types , local. defaults . catalyst_center . fabric . border_devices . border_types , null )
286288 local_autonomous_system_number = try (local. border_devices [each . key ]. local_autonomous_system_number , local. defaults . catalyst_center . fabric . border_devices . local_autonomous_system_number , null )
287289 default_exit = try (local. border_devices [each . key ]. default_exit , local. defaults . catalyst_center . fabric . border_devices . default_exit , null )
@@ -314,8 +316,10 @@ resource "catalystcenter_fabric_device" "edge_device" {
314316 try (lookup (local. device_name_to_id , each. value . fqdn_name , null ), null ),
315317 try (lookup (local. device_ip_to_id , each. value . device_ip , null ), null )
316318 )
317- fabric_id = try (catalystcenter_fabric_zone. fabric_zone [each . value . fabric_zone ]. id , catalystcenter_fabric_site. fabric_site [each . value . fabric_site ]. id , null )
318- device_roles = try (each. value . fabric_roles , local. defaults . catalyst_center . inventory . devices . fabric_roles , null )
319+ fabric_id = try (catalystcenter_fabric_zone. fabric_zone [each . value . fabric_zone ]. id , catalystcenter_fabric_site. fabric_site [each . value . fabric_site ]. id , null )
320+ device_roles = try ([
321+ for fabric_role in try (each. value . fabric_roles , []) : fabric_role if fabric_role != " EMBEDDED_WIRELESS_CONTROLLER_NODE"
322+ ], local. defaults . catalyst_center . inventory . devices . fabric_roles , null )
319323
320324 depends_on = [catalystcenter_device_role . role , catalystcenter_provision_devices . provision_devices , catalystcenter_provision_device . provision_device , catalystcenter_fabric_device . border_device ]
321325}
0 commit comments