A for expression transforms values into another collection. It is different from for_each: the expression returns a value, while the meta-argument creates resource instances. Square brackets build a tuple-style result; braces build an object-style result with explicit keys.
An optional if condition filters elements. Think about the output when no elements match and when multiple elements would produce the same key. In these tasks, a local list describes branch capacities and a root output publishes a derived list. Keep the calculation connected to its source so a later input change flows through automatically.
The expression produces a list without creating resources.