Hi People! For what it's worth for_each was also tried but no luck. The way I managed to get this resoucre working was by using a single resource (It doesnt seem multiple resources can be used for the "meraki_switch_stp" resource) And unfortunately I had to remove the programmability of the resource and simply point to either a S/N or stack ID per device/stack. This meant that this resource couldnt reside in the module as different sites had diferent setups. Therefore a seperate folder was created per site for "global variables" which was ran seperately from the bulk/main configuration. See below: resource "meraki_switch_stp" "combined_stp_configuration" { network_id = jsondecode(data.aws_secretsmanager_secret_version.meraki_network_id.secret_string)[var.meraki_network_id] rstp_enabled = true stp_bridge_priority = [ # Core stack priority { stp_priority = var.core_stp_priority stacks = [jsondecode(data.aws_secretsmanager_secret_version.stack_ids.secret_string)[var.core_stack_id]] }, # Access stack priority { stp_priority = var.access_stp_priority stacks = [jsondecode(data.aws_secretsmanager_secret_version.stack_ids.secret_string)[var.access_stack_id]] }, # External switch 1 priority { stp_priority = var.ext_stp_priority_1 switches = [ jsondecode(data.aws_secretsmanager_secret_version.meraki_switch_serials.secret_string)[var.external_switch1_serial] ] }, # External switch 2 priority { stp_priority = var.ext_stp_priority_2 switches = [ jsondecode(data.aws_secretsmanager_secret_version.meraki_switch_serials.secret_string)[var.external_switch2_serial] ] } ] } Archie
... View more