Hello and sorry for the naive question – I’ve been banging my head trying to get this one right and not repeating myself.
I need an array of metrics containing arrays of string as per AWS dashboard metrics:
Currently I have metrics defined as such:
local.keys is a List of Strings
metrics = [
for i, k in local.keys : [
for metric in ["metric1", "metric2"] : [
for method in ["method1", "method2"] : [
"Server", metric, "dim1", k, "dim2", method,
{ "region" : "...", "id" : "ms${method}${i}", "visible" : false }
]
]
]
]
Wanting the output to be like:
[["Server", metric, "dim1", k, "dim2", method,{ "region" : "...", "id" : "ms${method}${i}","visible" : false }] ... ... ...]
but it is not.