From 2e1a2d1adc02f91033559abacfcadcb686160039 Mon Sep 17 00:00:00 2001 From: Alexandre NICOLAIE Date: Wed, 17 May 2023 17:09:39 +0200 Subject: [PATCH 1/2] Remove empty provisioner block Earlier versions of Terraform used empty provider blocks ("proxy provider configurations") for child modules to declare their need to be passed a provider configuration by their callers. That approach was ambiguous and is now deprecated. --- examples/hcloud-k3s/main.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/hcloud-k3s/main.tf b/examples/hcloud-k3s/main.tf index 21a8331..424e783 100644 --- a/examples/hcloud-k3s/main.tf +++ b/examples/hcloud-k3s/main.tf @@ -1,5 +1,3 @@ -provider "hcloud" {} - data "hcloud_image" "ubuntu" { name = "ubuntu-20.04" } From 15fc0c864a6b32603337e69b0859b1b85ae1a386 Mon Sep 17 00:00:00 2001 From: Alexandre NICOLAIE Date: Wed, 17 May 2023 17:10:58 +0200 Subject: [PATCH 2/2] Add empty map for k3s_install_env_vars by default Because we can iterate over null, I prefer to have an empty map as default value for k3s_install_env_vars --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 09c586b..cca6c3e 100644 --- a/variables.tf +++ b/variables.tf @@ -12,7 +12,7 @@ variable "k3s_version" { variable "k3s_install_env_vars" { description = "map of enviroment variables that are passed to the k3s installation script (see https://docs.k3s.io/reference/env-variables)" type = map(string) - default = null + default = {} validation { condition = !can(var.k3s_install_env_vars["INSTALL_K3S_VERSION"])