Helm

Helm

The helm resource allows Helm charts to be provisioned to k8s_cluster resources.


resource "helm" "name" {
  ...
}

Attributes

Attribute
Description

Chart chart required type: string

The name of the chart within the repository, or a souce such as a git repository, URL, or file path where the chart file exist.

chart   = "hashicorp/vault"

Cluster cluster required type: Reference to Cluster

A reference to a kubernetes clusters to apply the chart to. The system waits until the referenced cluster is healthy before attempting t apply any charts.

cluster = resource.k8s_cluster.k3s

ValuesString values_string type: map[string]string

Map containing helm values to apply with the chart.

values_string = {
  "global.storage" = "128Mb"
}

Version version type: string

Semver of the chart to install, only used when `repository` is specified.

version = "v0.18.0"

Values values type: string

File path to a valid Helm values file to be used when applying the config.

values = "./values.yaml"

Repository repository type: block HelmRepository

The details for the Helm chart repository where the chart exists. If this property is not specifed, the chart location is assumed to be either a local directory or Git reference.

repository {
  name = "hashicorp"
  url  = "https://helm.releases.hashicorp.com"
}

Namespace namespace type: string

Kubernetes namespace to apply the chart to.

namespace = "default"

CreateNamespace create_namespace type: bool

If the namespace does not exist, should the helm resource attempt to create it.

create_namespace = true

SkipCRDs skip_crds type: bool

If the chart defines custom resource definitions, should these be ignored.

skip_crds = true

Retry retry type: int

Enables the ability to retry the installation of a chart.

retry = 3

Timeout timeout type: string

Maximum time the application phase of a chart can run before failing. This duration is different to the health_check that runs after a chart has been applied.

timeout = "60s"

HealthCheck health_check type: block HealthCheckKubernetes

Health check to run after installing the chart.

health_check {
  pods = ["app.kubernetes.io/name=vault"]
}

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.

Attribute
Description

Meta ID meta.id string

The full ID of the resource e.g. `resource.type.name`. This is computed from the full resource path:

// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting id will be
resource.container.ubuntu

Meta Type meta.type string

The type of the resource. This taken from the type label of the resource definition.

// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting type will be
container

Meta Name meta.name string

The name of the resource. This taken from the name label of the resource definition.

// given the following resource
resource "container" "ubuntu" {
  ...
}

// the resulting name will be
ubuntu


HelmRepository

A helm_repository stanza defines the details for a remote helm repository.


helm_repository {
  ...
}

Attributes

Attribute
Description

Name name required type: string

The name of the repository.

name = "hashicorp"

URL url required type: string

The repository URL.

url  = "https://helm.releases.hashicorp.com"

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.


HealthCheckKubernetes

A health_check stanza allows the definition of a health check which must pass before the resource is marked as successfully created.


health_check {
  ...
}

Attributes

Attribute
Description

Timeout timeout required type: string

The maximum duration to wait before marking the health check as failed. Expressed as a Go duration, e.g. `1s` = 1 second, `100ms` = 100 milliseconds.

timeout = "60s"

Pods pods required type: []string

An array of kubernetes selector syntax. The healthcheck ensures that all containers defined by the selector are running before passing the healthcheck.

pods = ["app.kubernetes.io/name=vault"]

Computed Attributes

These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.

Last updated