Files
TerraHome/terraform/variables.tf

112 lines
2.3 KiB
Terraform
Raw Normal View History

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."
}
}
2025-04-17 01:28:18 +01:00
variable "target_node" {
type = string
}
variable "clone_template" {
type = string
}
variable "control_plane_count" {
type = number
default = 3
description = "Number of control plane VMs"
2025-04-17 01:28:18 +01:00
}
variable "worker_count" {
type = number
default = 3
description = "Number of worker VMs"
2025-04-17 01:28:18 +01:00
}
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)
2026-02-28 15:35:52 +00:00
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"
2025-04-17 01:28:18 +01:00
}
variable "worker_disk_size" {
type = string
default = "120G"
description = "Disk size for worker VMs"
2025-04-17 01:28:18 +01:00
}
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"
}