I have a map in Terraform, values of which I want to transform by prepending them with a string, resulting in another map.
variable "my_map" {
type = map(string)
}
locals {
my_new_map = [for key, value in var.my_map: { key = "prefix/${value}"}]
}
But local.my_new_map is a tuple instead of a map. What am I missing for the result to be a map?