title: Fix indentation with Terraform yamlencode
body: <p>I'm deploying a helm chart with <code>Terraform v0.14.11</code>, using the <code>yamlencode</code> function to encode my values.</p>
  <pre><code>resource &quot;helm_release&quot; &quot;foo&quot; {
    name = local.chart_name
  
    chart     = &quot;${path.module}/charts/${local.chart_name}&quot;
    namespace = var.name-sp
    values    = [yamlencode(local.helm_values.foo)]
  }
  </code></pre>
  <p>And this is what my <code>local_helm_values.foo</code> looks like</p>
  <pre><code>alertmanagerFiles = {
  &quot;alertmanager.yml&quot; = var.slack_key != &quot;&quot; ? {
      global = {
      slack_api_url = var.alertmanager_slack_key
  
      receivers = [for k, v in var.receivers : {
        name = k
        slack_configs = [{
          send_resolved = true
          channel       = v.channel
          title         = &quot;&quot;
          text          = &quot;&quot;
      }]
      }]
  
      route = {
        group_wait = &quot;10s&quot;
        group_interval = &quot;3m&quot;
        receiver = &quot;slack-notify&quot;
        repeat_interval = &quot;5m&quot;
          }
      }
      } : {}
  }
  </code></pre>
  <p>However, the chart deploys with errors and when I run the <code>helm get manifest</code> command, the indentation looks off.</p>
  <pre><code>  alertmanager.yml: |
      global:
        receivers:
        - name: slack_notify
          slack_configs:
          - channel: '#prometheus-alerts'
  
        route:
          routes:
            receiver: slack_notify
            repeat_interval: 5m
        slack_api_url: https://hooks.slackurl
  </code></pre>
  <p>Instead of</p>
  <pre><code>  alertmanager.yml: |
      global:
      receivers:
      - name: slack_notify
        slack_configs:
        - channel: '#prometheus-alerts'
  
      route:
        routes:
          receiver: slack_notify
          repeat_interval: 5m
        slack_api_url: https://hooks.slackurl
  </code></pre>
  <p>Is there a way to get the correct indentation levels?</p>