title: How to use ellipsis (…) in nested for loop
body: <p>I see this error &quot;If duplicates are expected, use the ellipsis (...) after the value expression to enable grouping by key.&quot;</p>
  <pre><code>locals {
    key_id = {
      for x in var.security_rules :
    &quot;${x.type}&quot; =&gt; x}
  }
  </code></pre>
  <p>Is it possible to use ellipsis in a nested for this loop and how can i do it?</p>