Is it possible to construct a data structure given the input variable below, where you append the name value to each value in the stages list;
environments = [
{
name = "preprod"
stages = ["blue", "green"]
},
{
name = "qat"
stages = ["blue", "green"]
}
]
so that I end up with a data structure that looks like this once flattened:
local.transformed = [
"preprod-blue",
"preprod-green",
"prod-blue",
"prod-green"
]