feat: Add HA Kubernetes cluster with Terraform + Ansible
- 3x CX23 control plane nodes (HA) - 4x CX33 worker nodes - k3s with embedded etcd - Hetzner CCM for load balancers - Gitea CI/CD workflows - Backblaze B2 for Terraform state
This commit is contained in:
100
terraform/variables.tf
Normal file
100
terraform/variables.tf
Normal file
@@ -0,0 +1,100 @@
|
||||
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 = 4
|
||||
}
|
||||
|
||||
variable "worker_type" {
|
||||
description = "Hetzner server type for workers"
|
||||
type = string
|
||||
default = "cx33"
|
||||
}
|
||||
|
||||
variable "location" {
|
||||
description = "Hetzner datacenter location"
|
||||
type = string
|
||||
default = "fsn1"
|
||||
}
|
||||
|
||||
variable "allowed_ssh_ips" {
|
||||
description = "IP ranges allowed for SSH access"
|
||||
type = list(string)
|
||||
default = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
variable "allowed_api_ips" {
|
||||
description = "IP ranges allowed for Kubernetes API access"
|
||||
type = list(string)
|
||||
default = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user