title: Is provider variable possible in terraform?
body: <p>Is it still not possible to use variable provider in Terraform v0.12.6 ? In *.tfvars I have list variable  <strong>supplier</strong></p>
  <pre><code>supplier = [&quot;azurerm.core-prod&quot;,&quot;azurerm.core-nonprod&quot;]
  </code></pre>
  <p>and providers defined in provider.tf:</p>
  <pre><code>provider &quot;azurerm&quot; {
    ...
    alias           = &quot;core-prod&quot;
  }
  
  provider &quot;azurerm&quot; {
    ...
    alias = &quot;core-nonprod&quot;
  </code></pre>
  <p>then I want to reference it in *.tf . The example below is with 'data', but the same applies to 'resource'</p>
  <pre><code>data &quot;azurerm_public_ip&quot; &quot;pip&quot; {
    count = &quot;${var.count}&quot;
     ....
     provider = &quot;${var.supplier[count.index]}&quot;
  } 
  </code></pre>
  <p>What is a workaround ? <strong>Error: Invalid provider configuration reference</strong>, showing that <em>The provider argument requires a provider type name, optionally followed by a period and then a configuration alias</em>.</p>