Skip to content

Commit

Permalink
Merge pull request #1588 from janfrederik/fix/1586-disable_hetzner_csi
Browse files Browse the repository at this point in the history
fix Allow setting disable_hetzner_csi = true
  • Loading branch information
mysticaltech authored Dec 23, 2024
2 parents 9524d1e + 2981ea2 commit 9381315
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion init.tf
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,12 @@ resource "null_resource" "kustomization" {
content = templatefile(
"${path.module}/templates/hcloud-csi.yaml.tpl",
{
version = local.csi_version
# local.csi_version is null when disable_hetzner_csi = true
# In that case, we set it to "*" so that the templatefile() can handle it,
# because tempaltefile() does not support null values. Moreover, coalesce() doesn't
# support empty strings either.
# The entire file is ignored by kustomization.yaml anyway if disable_hetzner_csi = true.
version = coalesce(local.csi_version, "*")
values = indent(4, trimspace(local.hetzner_csi_values))
})
destination = "/var/post_install/hcloud-csi.yaml"
Expand Down

0 comments on commit 9381315

Please sign in to comment.