<p>I'm able to install grafana using the <code>stable/grafana</code> chart, using Terraform and the Helm provider. I'm trying to configure grafana with a new grafana.ini file, which <em>should</em> be possible using a <code>set</code>, however it doesn't appear to pick up the configuration at all. </p>

<p>I've also tried using the Helm release resources <a href="https://www.terraform.io/docs/providers/helm/release.html#values" rel="nofollow noreferrer">values</a> key to merge in the same config in yaml format (with a top-level <code>grafana.ini</code> key), also with no success. </p>

<p>What I'm trying to achieve is a file containing my config, in ini or yml format, passed to the grafana Helm chart so I can configure grafana correctly (ultimately I need to configure OAuth providers via the config) using Terraform. </p>

<p>Relevant config snips below. </p>

<ul>
<li>Chart <a href="https://github.com/helm/charts/tree/master/stable/grafana" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/grafana</a></li>
<li>Terraform v0.12.3</li>
<li>provider.helm v0.10.2</li>
<li>provider.kubernetes v1.8.0</li>
</ul>

<p><em>grafana.ini</em></p>

<pre><code>[security]
admin_user = username
</code></pre>

<p><em>main.tf (excerpt)</em></p>

<pre><code>resource "helm_release" "grafana" {
  chart = "stable/grafana"
  name = "grafana"

  set {
    name = "grafana.ini"
    value = file("grafana.ini")
  }
}
</code></pre>

MunkyJunky
<p>I eventually found the correct way of merging the values key - it turns out (no surprise) I had the format of grafana.ini wrong when converting to YAML. Here's the working config:</p>

<p><em>config.yaml</em></p>

<pre><code>grafana.ini:
  default:
    instance_name: my-server
  auth.basic:
    enabled: true
</code></pre>

<p><em>main.tf</em></p>

<pre><code>resource "helm_release" "grafana" {
  chart = "stable/grafana"
  name = "grafana"
  values = [file("config.yaml")]
}
</code></pre>
