Trying to spin up queues from a YAML file using for_each. The YAML has name and description keys. My locals look like this:
locals {
queues = yamldecode(file("queues.yaml"))
}
The resource block uses for_each = local.queues. But I’m getting Error: Invalid for_each argument. It seems to want a map of strings, not a list of objects. How do I convert that YAML list into a valid map for for_each without hardcoding keys?