Terraform for_each loop failing on CXone queue creation from YAML

Trying to spin up multiple queues using for_each with data from a YAML variable file. The yamldecode function parses fine, but the nice_cxone_routing_queue resource throws a validation error on the name attribute. It seems to be treating the map keys as invalid characters or something similar.

Here is the resource block causing the headache. The YAML structure is just a simple map of names to configs. What am I missing here?

resource "nice_cxone_routing_queue" "test_queues" {
 for_each = var.queue_map
 name = each.key
}