Terraform for_each with YAML vars for multiple queues

How do I use for_each to create multiple queues from a YAML variable file? I have a YAML file with queue names and descriptions. I want to loop through it in Terraform. I tried using yamldecode(file("queues.yaml")) but the map structure doesn’t match what genesyscloud_routing_queue expects. The resource fails to plan. Is there a way to flatten the YAML data into a map of maps that works with for_each? Here is my current config snippet.