Getting an Environment Variable in Terraform configuration?
<p>I have two environment variables. One is <code>TF_VAR_UN</code> and another is <code>TF_VAR_PW</code>. Then I have a terraform file that looks like this.</p>

<pre><code>resource "google_container_cluster" "primary" {
    name = "marcellus-wallace"
    zone = "us-central1-a"
    initial_node_count = 3

    master_auth {
        username = ${env.TF_VAR_UN}
        password = ${env.TF_VAR_PW}
    }

    node_config {
        oauth_scopes = [
            "https://www.googleapis.com/auth/compute",
            "https://www.googleapis.com/auth/devstorage.read_only",
            "https://www.googleapis.com/auth/logging.write",
            "https://www.googleapis.com/auth/monitoring"
        ]
    }
}
</code></pre>

<p>The two values I'd like to replace with the environment variables <code>TF_VAR_UN</code> and <code>TF_VAR_PW</code> are the values username and password. I tried what is shown above, with no success, and I've toyed around with a few other things but always get syntax issues.</p>