From f8c89da4a1e071c8c27fdca19495c003529dce25 Mon Sep 17 00:00:00 2001 From: pierre geeraert Date: Sun, 11 Oct 2026 12:49:45 +0100 Subject: [PATCH] fix bool error --- core/deployment.tf | 4 +-- core/module.tf | 12 ++++----- core/variables.auto.tfvars | 53 ++++++++++++++++++-------------------- 3 files changed, 32 insertions(+), 37 deletions(-) diff --git a/core/deployment.tf b/core/deployment.tf index e8d7048..f4f8e2f 100644 --- a/core/deployment.tf +++ b/core/deployment.tf @@ -199,9 +199,9 @@ resource "kubernetes_deployment_v1" "automatic" { } dynamic "host_path" { - for_each = volume.value.host_path ? [1] : [] + for_each = volume.value.host_path != null || volume.value.local_path ? [1] : [] content { - path = coalesce(volume.value.host_filepath, null) + path = coalesce(volume.value.host_path, null) } } diff --git a/core/module.tf b/core/module.tf index 6064985..f6ff003 100644 --- a/core/module.tf +++ b/core/module.tf @@ -22,13 +22,11 @@ variable "kubernetes" { docker = optional(bool) image = string pvc = optional(map(object({ - name = string - - config_map = optional(bool, false) - secret = optional(bool, false) - host_path = optional(bool, false) - host_filepath = optional(string) - + name = string + config_map = optional(bool, false) + secret = optional(bool, false) + local_path = optional(bool, false) + host_path = optional(string) storage_class_name = optional(string, "nfs-storage-intelligent") annotations_fileType = optional(string) mount_path = string diff --git a/core/variables.auto.tfvars b/core/variables.auto.tfvars index 1f59347..b6eeecd 100644 --- a/core/variables.auto.tfvars +++ b/core/variables.auto.tfvars @@ -135,20 +135,17 @@ kubernetes = { pvc = { bitwarden-ca-certificates = { - pvc = true pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-core = { - pvc = true pvc_size = "2Mi" mount_path = "/etc/bitwarden/core" name = "bitwarden-core" } bitwarden-logs = { - pvc = true pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -172,20 +169,20 @@ kubernetes = { pvc = { bitwarden-ca-certificates = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-core = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/core" name = "bitwarden-core" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -208,7 +205,7 @@ kubernetes = { pvc = { bitwarden-core = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/core/attachments" name = "bitwarden-core" @@ -229,13 +226,13 @@ kubernetes = { pvc = { bitwarden-ca-certificates = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -257,13 +254,13 @@ kubernetes = { pvc = { bitwarden-ca-certificates = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -284,26 +281,26 @@ kubernetes = { pvc = { bitwarden-identity = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/identity" name = "bitwarden-identity" } bitwarden-ca-certificates = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-core = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/core" name = "bitwarden-core" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -330,14 +327,14 @@ kubernetes = { pvc = { bitwarden-mssql = { - pvc = true + pvc_size = "2Mi" mount_path = "/var/opt/mssql/data" name = "bitwarden-mssql" sub_path = "data" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -357,26 +354,26 @@ kubernetes = { pvc = { bitwarden-nginx = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/nginx" name = "bitwarden-nginx" } bitwarden-letsencrypt = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/letsencrypt" name = "bitwarden-letsencrypt" } bitwarden-ssl = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/ssl" name = "bitwarden-ssl" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/var/log/nginx" name = "bitwarden-logs" @@ -396,13 +393,13 @@ kubernetes = { pvc = { bitwarden-ca-certificates = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -422,25 +419,25 @@ kubernetes = { pvc = { bitwarden-identity = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/identity" name = "bitwarden-identity" } bitwarden-core = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/core" name = "bitwarden-core" } bitwarden-ca-certificates = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/ca-certificates" name = "bitwarden-ca-certificates" } bitwarden-logs = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/logs" name = "bitwarden-logs" @@ -460,7 +457,7 @@ kubernetes = { pvc = { bitwarden-web = { - pvc = true + pvc_size = "2Mi" mount_path = "/etc/bitwarden/web" name = "bitwarden-web"