title: unexpected type error after terraform 0.12 migration
body: <p>I am in the process of migrating my terraform 0.11 configuration to terraform 0.12.5. </p>
  
  <p>The migration (using 0.12upgrade) went relatively smoothly, but then I encountered this error during the next plan</p>
  
  <pre><code>Error: Invalid value for module argument
  
    on main.tf line 72, in module "foo":
    72:   subnet_ids  = module.vpc.subnet_ids
  
  The given value is not suitable for child module variable "subnet_ids"
  defined at ../../modules/foo/main.tf:10,1-30: element 0: string
  required.
  </code></pre>
  
  <p>The module <code>foo</code> has a (migrated) variable declaration subnet_ids that looks like this:</p>
  
  <pre><code>variable "subnet_ids" {
    type = list(string)
  }
  </code></pre>
  
  <p>while the <code>vpc</code> module has an output declaration that is declared like this:</p>
  
  <pre><code>output "subnet_ids" {
    value = [aws_subnet.private.*.id]
  }
  </code></pre>
  
  <p><strike>It seems that if I relax the type constraint on the <code>foo</code> module the error goes away.</p>
  
  <p>However, is this the correct thing to do. After all, isn't the output of the vpc module actually a list of strings? How do I check the type of the vpc output variable?</strike></p>
  
  <p><strong>Update:</strong> relaxing the type constraint allows the first part of the validation to succeed, but merely causes problems for the consuming module when the variable is applied as per this output</p>
  
  <pre><code>Error: Incorrect attribute value type
  
    on ../../modules/foo/main.tf line 350, in resource "aws_ecs_service" "api":
   350: subnets         = var.subnet_ids
  
  Inappropriate value for attribute "subnets": incorrect set element type:
  string required.
  
  </code></pre>
  
  <p>So the question is: what am I doing wrong when I am defining the output value? How to I ensure the output value is a list of strings so that I don't get the original error? How can I inspect the type of <code>vpc.subnet_ids</code>?</p>