# Set kibanaConfig via Helm in Terraform

**URL:** <https://discuss.elastic.co/t/set-kibanaconfig-via-helm-in-terraform/295547>\
**Category:** Kibana\
**Created:** [January 27, 2022, 6:36am UTC](https://discuss.elastic.co/t/set-kibanaconfig-via-helm-in-terraform/295547 "2022-01-27T06:36:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![florian.besser](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@florian.besser](https://discuss.elastic.co/u/florian.besser)\
**Post date:** [January 27, 2022, 6:36am UTC](https://discuss.elastic.co/t/set-kibanaconfig-via-helm-in-terraform/295547/1 "2022-01-27T06:36:47Z")

</div>

I'm using terraform to deploy Kibana using helm:

```auto
resource "helm_release" "kibana" {
  name = "kibana"
  namespace = "elastic"
  create_namespace = true

  repository = "https://helm.elastic.co"
  chart = "kibana"

  set {
    name = "kibanaConfig"
    value = jsonencode({"kibana.yml": { server : { basePath : "/kibana" } }})
    # value = "kibana.yml: |\nserver.basePath: /kibana"
  }
}

```

As you can see I'm trying to overwrite `kibanaConfig` from the Helm chart. However I'm met with no success.  
I'd like to set the `server.basePath` to `/kibana` but no matter what I put there for a value the Terraform apply fails.

In this particular example the error message is:

```auto
Error: failed parsing key "kibanaConfig" with value {"kibana.yml":{"server":{"basePath":"/kibana"}}}, key "}}" has no value

```

Could you point to a successful example where this is actually set?

---

<div class="post-metadata">

**Author:** ![florian.besser](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@florian.besser](https://discuss.elastic.co/u/florian.besser)\
**Post date:** [January 27, 2022, 7:23am UTC](https://discuss.elastic.co/t/set-kibanaconfig-via-helm-in-terraform/295547/2 "2022-01-27T07:23:42Z")

</div>

For anyone wondering I found a workaround:

```auto
resource "helm_release" "kibana" {
  name = "kibana"
  namespace = "elastic"
  create_namespace = true

  repository = "https://helm.elastic.co"
  chart = "kibana"

  values = [
    file("kibana-values.yaml")
  ]
}

```

And then create a separate file `kibana-values.yaml` with the following content:

```auto
kibanaConfig:
  kibana.yml: |
    server:
      basePath: /kibana

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 24, 2022, 7:24am UTC](https://discuss.elastic.co/t/set-kibanaconfig-via-helm-in-terraform/295547/3 "2022-02-24T07:24:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
