title: How do I pass variables to a yaml file in heml.tf?
body: <p>I have a file for creating terraform resources with helm <code>helm.tf</code>.</p>
  <p>In this file I create a honeycomb agent and need to pass in some watchers, so I'm using a yaml file for configuration. Here is the snippet from helm.tf:</p>
  <pre><code>resource &quot;helm_release&quot; &quot;honeycomb&quot; {
    version = &quot;0.11.0&quot;
    depends_on = [module.eks]
    repository = &quot;https://honeycombio.github.io/helm-charts&quot;
    chart = &quot;honeycomb&quot;
    name = &quot;honeycomb&quot;
  
    values = [
      file(&quot;modules/kubernetes/helm/honeycomb.yml&quot;)
    ]
  }
  </code></pre>
  <p>and here is the yaml file</p>
  <pre><code>agent:
    watchers:
      - labelSelector: &quot;app=my-app&quot;
        namespace: my-namespace
        dataset: {{$env}}
        parser:
          name: nginx
          dataset: {{$env}}
          options:
            log_format: &quot;blah&quot;
  </code></pre>
  <p>Unfortunately my attempt at setting the variables with <code>{{$x}}</code> has not worked, so how would I send the <code>env</code> variable to the yaml values file? I have the variable available to me in the tf file but am unsure how to set it up in the values file.</p>
  <p>Thanks</p>