Hi,
I have a list of ids and a map containing settings x, y… for the ids. The map does not contain entries all the ids. I was hoping to build a map with an entry for each id with this format:
{
id1 = {
x = ...
y = ...
},
id2 = {
x = ...
y = ...
}
...
}
I thought about using a for loop like this:
instruction_map = [ for id in local.ids : {
"${id}" = {
x = lookup...
y = lookup...
}
}
]
But that created the following:
[
{
"id1" = {
"x" = "..."
"y" = "..."
}
},
{
"id2" = {
"x" = "...",
"y" = "..."
}
},
]
Is there a way to transform that structure to the one I want, or a better way to build the map?