Terraform for_each with YAML queue list fails on dynamic lookup

Trying to provision multiple Genesys Cloud queues using for_each driven by a YAML variable file. The YAML structure is flat, just a list of objects with name, description, and outbound_settings. When I pass the parsed YAML output into the genesyscloud_routing_queue resource, the for_each loop throws an error about invalid index lookup during the plan phase.

Here’s the relevant snippet:

locals {
 queues = yamldecode(file("${path.module}/queues.yaml")).queues
}

resource "genesyscloud_routing_queue" "main" {
 for_each = local.queues
 name = each.value.name
 description = each.value.description
}

The error says each.value.name is not valid because each is not defined, which usually means the map passed to for_each isn’t being recognized as a map. I’ve tried wrapping the list in a zipmap but that feels like a hack for what should be a direct iteration. Am I missing a conversion step between the YAML list and the Terraform map expectation?