refactor(tofu): extract variables into their own files

The .tfvars files are normally gitignored, but they serve as an example here. Just need to make sure I don't commit a secret...

Inpired by #236
This commit is contained in:
Vegard Hagen
2025-03-23 17:19:46 +01:00
parent 1cf6031a53
commit 737e047c8e
24 changed files with 313 additions and 231 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ data "talos_machine_configuration" "this" {
vip = var.cluster.vip
}), each.value.machine_type == "controlplane" ?
templatefile("${path.module}/machine-config/control-plane.yaml.tftpl", {
cilium_values = var.cilium.values
cilium_install = var.cilium.install
cilium_values = file("${path.root}/${var.cilium.values_path}")
cilium_install = file("${path.root}/${var.cilium.install_manifest_path}")
base_domain = var.cluster.base_domain
}) : ""
]