title: vpc_zone_identifier should be a list
body: <p>I'm not getting my head around this. When doing a terraform plan it complains the value should be a list. Fair enough. Let's break this down in steps.</p>
  
  <h2>The error</h2>
  
  <pre><code>1 error(s) occurred:
  
  * module.instance-layer.aws_autoscaling_group.mariadb-asg: vpc_zone_identifier: should be a list
  </code></pre>
  
  <h2>The setup</h2>
  
  <p>The VPC and subnets are created with terraform in another module.
  The outputs of that module give the following:</p>
  
  <pre><code>"subnets_private": {
                      "sensitive": false,
                      "type": "string",
                      "value": "subnet-1234aec7,subnet-1234c8a7"
                  },
  </code></pre>
  
  <p>In my main.tf I use the output of said module to feed it into a variable for my module that takes care of the auto scaling groups:</p>
  
  <pre><code>  subnets_private                         = "${module.static-layer.subnets_private}"
  </code></pre>
  
  <p>This is used in the module to require the variable:</p>
  
  <pre><code>variable "subnets_private" {}
  </code></pre>
  
  <p>And this is the part where I configure the vpc_zone_identifier:</p>
  
  <h2>Attempt: split</h2>
  
  <pre><code>resource "aws_autoscaling_group" "mariadb-asg" {
    vpc_zone_identifier  = "${split(",",var.subnets_private)}"
  </code></pre>
  
  <h2>Attempt: list</h2>
  
  <pre><code>resource "aws_autoscaling_group" "mariadb-asg" {
    vpc_zone_identifier  = "${list(split(",",var.subnets_private))}"
  </code></pre>
  
  <h2>Question</h2>
  
  <p>The above attempt with the list(split( should in theory work. Since terraform complains but doesn't print the actual value it's quite hard to debug. Any suggestions are appreciated.</p>
  
  <p>Filling in the value manually works.</p>