This Terraform module deploys a Helm chart to a Kubernetes cluster. It supports custom values files, values maps, and several configuration options.
name(string): The name of the Helm release.repository(string): The repository URL of the Helm chart. Default is "https://charts.example.com".chart(string): The name of the Helm chart.version(string): The version of the Helm chart. Default is "latest".namespace(string): The Kubernetes namespace to install the release into. Default is "default".custom_values_file(string): Path to the custom values YAML file.custom_values_map(map): Custom values in map format to override default values.timeout(string): Time to wait for Helm operations to complete. Default is "300s".recreate_pods(bool): If true, recreate pods after a successful upgrade. Default is false.disable_webhooks(bool): If true, disable webhooks during upgrade. Default is false.wait(bool): If true, wait for resources to be ready before marking the release as successful. Default is true.atomic(bool): If true, roll back changes on failure. Default is false.cleanup_on_fail(bool): If true, delete newly created resources if the release fails. Default is true.chart_version(string): Version of the Helm chart.create_namespace(bool): If true, create the namespace if it does not exist. Default is false.values_files(list): List of paths to YAML files with values.verify(bool): If true, verify the chart after downloading. Default is false.dependency_update(bool): If true, run 'helm dependency update' before installing. Default is false.
release_name: The name of the Helm release.chart_version: The version of the Helm chart deployed.namespace: The Kubernetes namespace where the Helm release is deployed.status: The status of the Helm release.url: The URL of the Helm chart repository.
module "helm_chart_deployment" {
source = "./helm_chart_deployment"
name = "my-release"
chart = "my-chart"
version = "1.0.0"
namespace = "my-namespace"
custom_values_file = "path/to/values.yaml"
custom_values_map = {
key1 = "value1"
key2 = "value2"
}
timeout = "600s"
recreate_pods = true
disable_webhooks = false
wait = true
atomic = true
cleanup_on_fail = true
chart_version = "1.0.0"
create_namespace = true
values_files = ["path/to/values1.yaml", "path/to/values2.yaml"]
verify = true
dependency_update = true
}