Skip to content

Helm Unit ΒΆ

Describes Terraform Helm provider invocation.

In the example below we use helm unit to deploy Argo CD to a Kubernetes cluster:

units:
  - name: argocd
    type: helm
    source:
      repository: "https://argoproj.github.io/argo-helm"
      chart: "argo-cd"
      version: "2.11.0"
    pre_hook:
      command: *getKubeconfig
      on_destroy: true
    kubeconfig: /home/john/kubeconfig
    additional_options:
      namespace: "argocd"
      create_namespace: true
    values:
      - file: ./argo/values.yaml
        apply_template: true
    inputs:
      global.image.tag: v1.8.3

In addition to common options the following are available:

  • force_apply - bool, optional. By default is false. If set to true, the unit will be applied when any dependent unit is planned to be changed.

  • source - map, required. This block describes Helm chart source.

  • chart, repository, version - correspond to options with the same name from helm_release resource. See chart, repository and version.

  • kubeconfig - string, required. Path to the kubeconfig file which is relative to the directory where the unit was executed.

  • provider_version - string, optional. Version of terraform helm provider to use. Default - latest. See terraform helm provider

  • additional_options - map of any, optional. Corresponds to Terraform helm_release resource options. Will be passed as is.

  • values - array, optional. List of values files in raw yaml to be passed to Helm. Values will be merged, in order, as Helm does with multiple -f options.

    • file - string, required. Path to the values file.

    • apply_template - bool, optional. Defines whether a template should be applied to the values file. By default is set to true.

  • inputs - map of any, optional. A map that represents Terraform helm_release sets. This block allows to use functions remoteState and insertYAML. For example:

  inputs:
    global.image.tag: v1.8.3
    service.type: LoadBalancer
  ```

Corresponds to:

```yaml
      set {
        name = "global.image.tag"
        value = "v1.8.3"
      }
      set  {
        name = "service.type"
        value = "LoadBalancer"
      }