Files
HetznerTerra/terraform/variables.tf
MichaelFisher1997 ff31cb4e74
Some checks failed
Deploy Cluster / Terraform (push) Failing after 10s
Deploy Cluster / Ansible (push) Has been skipped
Implement HA control plane with Load Balancer (3-3 topology)
Major changes:
- Terraform: Scale to 3 control planes (cx23) + 3 workers (cx33)
- Terraform: Add Hetzner Load Balancer (lb11) for Kubernetes API
- Terraform: Add kube_api_lb_ip output
- Ansible: Add community.network collection to requirements
- Ansible: Update inventory to include LB endpoint
- Ansible: Configure secondary CPs and workers to join via LB
- Ansible: Add k3s_join_endpoint variable for HA joins
- Workflow: Add imports for cp-2, cp-3, and worker-3
- Docs: Update STABLE_BASELINE.md with HA topology and phase gates

Topology:
- 3 control planes (cx23 - 2 vCPU, 8GB RAM each)
- 3 workers (cx33 - 4 vCPU, 16GB RAM each)
- 1 Load Balancer (lb11) routing to all 3 control planes on port 6443
- Workers and secondary CPs join via LB endpoint for HA

Cost impact: +~€26/month (2 extra CPs + 1 extra worker + LB)
2026-03-23 02:39:39 +00:00

124 lines
2.6 KiB
HCL

variable "hcloud_token" {
description = "Hetzner Cloud API token"
type = string
sensitive = true
}
variable "ssh_public_key" {
description = "Path to SSH public key"
type = string
default = "~/.ssh/id_ed25519.pub"
}
variable "ssh_private_key" {
description = "Path to SSH private key"
type = string
default = "~/.ssh/id_ed25519"
}
variable "cluster_name" {
description = "Name of the Kubernetes cluster"
type = string
default = "k8s-cluster"
}
variable "control_plane_count" {
description = "Number of control plane nodes"
type = number
default = 3
}
variable "control_plane_type" {
description = "Hetzner server type for control plane"
type = string
default = "cx23"
}
variable "worker_count" {
description = "Number of worker nodes"
type = number
default = 3
}
variable "worker_type" {
description = "Hetzner server type for workers"
type = string
default = "cx33"
}
variable "location" {
description = "Hetzner datacenter location"
type = string
default = "nbg1"
}
variable "allowed_ssh_ips" {
description = "IP ranges allowed for SSH access"
type = list(string)
default = []
}
variable "allowed_api_ips" {
description = "IP ranges allowed for Kubernetes API access"
type = list(string)
default = []
}
variable "restrict_api_ssh_to_tailnet" {
description = "Restrict SSH and Kubernetes API to tailnet CIDR"
type = bool
default = true
}
variable "tailnet_cidr" {
description = "Tailnet CIDR used for SSH/API access"
type = string
default = "100.64.0.0/10"
}
variable "tailscale_tailnet" {
description = "Tailnet domain suffix, e.g. mytailnet.ts.net"
type = string
}
variable "enable_nodeport_public" {
description = "Allow public NodePort traffic"
type = bool
default = false
}
variable "network_cidr" {
description = "CIDR for private network"
type = string
default = "10.0.0.0/16"
}
variable "subnet_cidr" {
description = "CIDR for server subnet"
type = string
default = "10.0.1.0/24"
}
variable "s3_access_key" {
description = "S3 access key for Terraform state"
type = string
sensitive = true
}
variable "s3_secret_key" {
description = "S3 secret key for Terraform state"
type = string
sensitive = true
}
variable "s3_endpoint" {
description = "S3 endpoint URL"
type = string
}
variable "s3_bucket" {
description = "S3 bucket name for Terraform state"
type = string
default = "k8s-terraform-state"
}