title: Concatenate two lists in Terraform 0.12 - concat()
body: <p>I want to concatenate two arrays in Terraform 0.12. In my example there are public and private subnets. I want to assign them both to the same network access lists. Following code shortened:</p>
  
  <pre><code>data "aws_subnet_ids" "private" {
      vpc_id = aws_vpc.main.id
      tags = {
          subnet-type  = "private"
      }
  }
  
  data "aws_subnet_ids" "public" {
      vpc_id = aws_vpc.main.id
      tags = {
          subnet-type  = "public"
      }
  }
  
  
  resource "aws_network_acl" "networks" {
      vpc_id = aws_vpc.main.id
  
      subnet_ids = concat(data.aws_subnet_ids.private.ids, data.aws_subnet_ids.public.ids)
      [...]
  }
  </code></pre>
  
  <p>If I use the following outputs:</p>
  
  <pre><code>output "private_subnets" {
    value = data.aws_subnet_ids.private.ids
  }
  
  output "public_subnets" {
    value = data.aws_subnet_ids.public.ids
  }
  </code></pre>
  
  <p>The following output is generated:</p>
  
  <pre><code>private_subnets = [
    "subnet-243zr427rhhfjseb9",
    "subnet-we789rh2438fchb6e",
    "subnet-092rz7g82fhhkui74",
  ]
  public_subnets = [
    "subnet-12230qegvg764e9d",
    "subnet-123465svgvgf0d7e",
  ]
  </code></pre>
  
  <p>So everything should work. But the following error is given:</p>
  
  <pre><code>iptizer@machine:~/src/infra$ terraform12 apply
  [...]
  
  Error: Invalid function argument
  
    on nacls.tf line 19, in resource "aws_network_acl" "networks":
    19:     subnet_ids = concat(data.aws_subnet_ids.private.ids, data.aws_subnet_ids.public.ids)
      |----------------
      | data.aws_subnet_ids.private.ids is set of string with 3 elements
  
  Invalid value for "seqs" parameter: all arguments must be lists or tuples; got
  set of string.
  </code></pre>
  
  <p>Bug.. or what am I missing?</p>