title: Terraform - How to join elements of a nested list?
body: <p>I have two lists - <code>["l","h"]</code>, <code>["a","b"]</code> and from that, I need to create a list like: <code>["la", "lb", "ha", "hb"]</code> - is it possible?</p>
  
  <p>I tried with <code>setproduct()</code>, <code>flatten()</code> and <code>join()</code> but the closest I could get, like this:</p>
  
  <pre><code>&gt; setproduct(["l","h"], ["a","b"])
  [
    [
      "l",
      "a",
    ],
    [
      "l",
      "b",
    ],
    [
      "h",
      "a",
    ],
    [
      "h",
      "b",
    ],
  ]
  #
  &gt; flatten(setproduct(["l","h"], ["a","b"]))
  [
    "l",
    "a",
    "l",
    "b",
    "h",
    "a",
    "h",
    "b",
  ]
  </code></pre>
  
  <p>I can also join a single element:</p>
  
  <pre><code>&gt; join("",setproduct(["l","h"], ["a","b"])[1])
  lb 
  </code></pre>
  
  <p>but yet to figure out how to get <code>["la", "lb", "ha", "hb"]</code> out of that. Any help from anyone?</p>
  
  <p>-S</p>