title: Error: Incorrect attribute value type module.network.private_subnets[0] is tuple with 3 elements
body: <p>I am running into an issue while trying to upgrade from terraform 11 to terraform 12. I was previously using the following syntax to retrieve the 3rd element from a list of ids from a module. The module output is like so:</p>
  <pre><code># Subnets
  output &quot;private_subnets&quot; {
    description = &quot;List of IDs of private subnets&quot;
    value       = [&quot;${aws_subnet.private.*.id}&quot;]
  }
  </code></pre>
  <p>Previously, this worked with terraform 11</p>
  <pre><code>subnet_id              = &quot;${element(module.network.private_subnets,3)}&quot;
  </code></pre>
  <p>I thought that I could use the index of 2 to get the same results, but I get the following error:</p>
  <pre><code>Error: Incorrect attribute value type
  
    on terraformfile.tf line 65, in resource &quot;aws_instance&quot; &quot;myinstance&quot;:
    65:   subnet_id              = module.network.private_subnets[2]
      |----------------
      | module.network.private_subnets[2] is tuple with 3 elements
  </code></pre>
  <p>Any help with this would be greatly appreciated.</p>