diff --git a/main-infra.tf b/main-infra.tf index f7ec966..2b74620 100644 --- a/main-infra.tf +++ b/main-infra.tf @@ -5,9 +5,9 @@ provider "hcloud" { } locals { - labels = { + labels = merge(var.hcloud_labels, { env = var.name - } + }) } # SSH Key diff --git a/variables.tf b/variables.tf index 5b0764b..45d89f2 100644 --- a/variables.tf +++ b/variables.tf @@ -47,6 +47,11 @@ variable "hcloud_image" { type = string default = "ubuntu-24.04" } +variable "hcloud_labels" { + description = "Additional labels that are added to all Hetzner Cloud resources" + type = map(string) + default = {} +} # K3S variable "k3s_channel" {