############################################################ # Variables for Hetzner Talos Kubernetes Cluster ############################################################ # ========================================================== # AUTENTICAÇÃO # ========================================================== variable "hcloud_token" { type = string description = "Hetzner Cloud API token" sensitive = true } # ========================================================== # CONFIGURAÇÃO DO CLUSTER # ========================================================== variable "enable_ha" { type = bool description = "Enable HA mode with 3 control plane nodes" default = true } variable "enable_loadbalancer" { type = bool description = "Enable Hetzner Load Balancer for HA access to control plane and ingress" default = true } variable "environment" { type = string description = "Environment name (prod, staging, dev)" default = "prod" validation { condition = contains(["prod", "staging", "dev"], var.environment) error_message = "Environment deve ser: prod, staging ou dev." } } # ========================================================== # SSH # ========================================================== variable "ssh_public_key" { type = string description = "Public SSH key for emergency access to nodes" } # ========================================================== # TALOS # ========================================================== variable "talos_image_id" { type = number description = "ID da imagem Talos customizada na Hetzner (criada na aula-07). Obtenha com: hcloud image list --type snapshot" } variable "talos_version" { type = string description = "Talos version to use" default = "v1.11.2" validation { condition = can(regex("^v[0-9]+\\.[0-9]+\\.[0-9]+$", var.talos_version)) error_message = "talos_version deve seguir o formato semântico: v1.2.3" } } # ========================================================== # LABELS CUSTOMIZADAS # ========================================================== variable "custom_labels" { type = map(string) description = "Custom labels to add to all resources" default = {} }