Files
TerraHome/terraform/variables.tf
MichaelFisher1997 a0b07816b9
Some checks failed
Terraform Plan / Terraform Plan (push) Failing after 10s
refactor: simplify homelab bootstrap around static IPs and fresh runs
Make Terraform the source of truth for node IPs, remove guest-agent/SSH discovery from the normal workflow path, simplify the bootstrap controller to a fresh-run flow, and swap the initial CNI to Flannel so cluster readiness is easier to prove before reintroducing more complex reconcile behavior.
2026-03-07 00:52:35 +00:00

146 lines
3.3 KiB
HCL

variable "pm_api_token_id" {
type = string
description = "Proxmox API token ID (format: user@realm!tokenid)"
validation {
condition = can(regex(".+!.+", trimspace(var.pm_api_token_id)))
error_message = "pm_api_token_id must be in format user@realm!tokenid."
}
}
variable "pm_api_token_secret" {
type = string
sensitive = true
description = "Proxmox API token secret"
validation {
condition = length(trimspace(var.pm_api_token_secret)) > 0
error_message = "pm_api_token_secret cannot be empty. Check your Gitea secret PM_API_TOKEN_SECRET."
}
}
variable "target_node" {
type = string
}
variable "clone_template" {
type = string
}
variable "control_plane_count" {
type = number
default = 3
description = "Number of control plane VMs"
}
variable "worker_count" {
type = number
default = 3
description = "Number of worker VMs"
}
variable "control_plane_vmid_start" {
type = number
default = 701
description = "Starting VMID for control plane VMs"
}
variable "worker_vmid_start" {
type = number
default = 711
description = "Starting VMID for worker VMs"
}
variable "control_plane_cores" {
type = number
default = 1
description = "vCPU cores per control plane VM"
}
variable "control_plane_memory_mb" {
type = number
default = 4096
description = "Memory in MB per control plane VM"
}
variable "worker_cores" {
type = list(number)
default = [4, 4, 4]
description = "vCPU cores for each worker VM"
}
variable "worker_memory_mb" {
type = list(number)
default = [12288, 12288, 12288]
description = "Memory in MB for each worker VM"
}
variable "control_plane_disk_size" {
type = string
default = "80G"
description = "Disk size for control plane VMs"
}
variable "worker_disk_size" {
type = string
default = "120G"
description = "Disk size for worker VMs"
}
variable "network_prefix_length" {
type = number
default = 10
description = "CIDR prefix length for static VM addresses"
}
variable "network_gateway" {
type = string
default = "10.27.27.1"
description = "Gateway for static VM addresses"
}
variable "control_plane_ips" {
type = list(string)
default = ["10.27.27.50", "10.27.27.51", "10.27.27.49"]
description = "Static IPv4 addresses for control plane VMs"
validation {
condition = length(var.control_plane_ips) == var.control_plane_count
error_message = "control_plane_ips length must match control_plane_count."
}
}
variable "worker_ips" {
type = list(string)
default = ["10.27.27.47", "10.27.27.46", "10.27.27.48"]
description = "Static IPv4 addresses for worker VMs"
validation {
condition = length(var.worker_ips) == var.worker_count
error_message = "worker_ips length must match worker_count."
}
}
variable "bridge" {
type = string
}
variable "storage" {
type = string
}
variable "pm_api_url" {
type = string
}
variable "qemu_agent_enabled" {
type = bool
default = false
description = "Enable QEMU guest agent integration in Proxmox resources"
}
variable "SSH_KEY_PUBLIC" {
type = string
description = "Public SSH key injected via cloud-init"
}