From fa26c49fc6c58881134fa55479701824ecdda417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Odstr=C4=8Dil=C3=ADk?= Date: Wed, 11 Dec 2024 11:39:16 +0100 Subject: [PATCH] feat(addon): add helm release install control variable --- modules/addon/helm.tf | 2 +- modules/addon/variables.tf | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/addon/helm.tf b/modules/addon/helm.tf index e9f3343..2659c31 100644 --- a/modules/addon/helm.tf +++ b/modules/addon/helm.tf @@ -1,5 +1,5 @@ resource "helm_release" "this" { - count = var.enabled == true && var.argo_enabled == false ? 1 : 0 + count = var.enabled == true && var.helm_enabled == true && var.argo_enabled == false ? 1 : 0 chart = var.helm_chart_name create_namespace = var.helm_create_namespace namespace = var.namespace diff --git a/modules/addon/variables.tf b/modules/addon/variables.tf index f1b4d1b..cca6b2c 100644 --- a/modules/addon/variables.tf +++ b/modules/addon/variables.tf @@ -6,6 +6,12 @@ variable "enabled" { # ================ common variables (required) ================ +variable "helm_enabled" { + type = bool + default = null + description = "Set to false to prevent installation of the module via Helm release. Defaults to `true`." +} + variable "helm_chart_name" { type = string default = null