title: Terraform does not work input and environment variables
body: <p>I have a <code>glue job</code> in <code>aws</code>.
  I made a loop.</p>
  <p>In <code>variables.tf</code></p>
  <pre><code>variable &quot;list_of_jobs&quot; {
    type = list(string)
    default = [&quot;myjob1&quot;,&quot;myjob2&quot;,&quot;myjob3&quot;]
  }
  
  </code></pre>
  <p>In <code>glue.tf</code></p>
  <pre><code>resource &quot;aws_glue_job&quot; &quot;this&quot; {
    for_each = toset(var.list_of_jobs)
    name     = each.value
    role_arn = var.role_arn
  
    command {
      name = &quot;pythonshell&quot;
      python_version = 3
      script_location = &quot;s3://mybucket/${each.value}/run.py&quot;
    }
  }
  </code></pre>
  <p>In <code>main.tf</code></p>
  <pre><code>variable &quot;region&quot; {}
  variable &quot;list_of_jobs&quot; {}
  
  module &quot;my_glue&quot; {
    source = &quot;../terraform-glue&quot;
    region = var.region
    list_of_jobs = var.list_of_jobs
  }
  </code></pre>
  <p>This loop works fine, and I have 3 <code>glue jobs</code> after execution of <code>terraform apply</code>.
  The problem, when I am trying to make:</p>
  <pre><code>export TF_VAR_list_of_jobs='[&quot;myjob1&quot;,&quot;myjob2&quot;,&quot;myjob3&quot;]'
  </code></pre>
  <p>In this case, when I am making <code>terraform apply</code>, I am receiving this:</p>
  <pre><code>Error: Invalid function argument
  
    on ../terraform-glue/glue.tf line 2, in resource &quot;aws_glue_job&quot; &quot;this&quot;:
     2:   for_each = toset(var.list_of_jobs)
      |----------------
      | var.list_of_jobsis &quot;[\&quot;myjob1\&quot;,\&quot;myjob2\&quot;,\&quot;myjob3\&quot;]&quot;
  
  Invalid value for &quot;v&quot; parameter: cannot convert string to set of any single
  type.
  
  </code></pre>
  <p>Input variables, does not work too. Only variable from <code>variables.tf</code>. Could You help me please ? I am trying to resolve this during all night.</p>