Files
talos-proxmox-cluster/terraform/variables.tf
2025-12-25 20:25:54 +01:00

182 lines
4.1 KiB
HCL

# Proxmox variables
variable "proxmox_endpoint" {
description = "The Proxmox API endpoint (e.g., https://proxmox.example.com:8006)"
type = string
}
variable "proxmox_username" {
description = "The Proxmox username (e.g., root@pam)"
type = string
default = "root@pam"
}
variable "proxmox_password" {
description = "The Proxmox password"
type = string
sensitive = true
}
variable "proxmox_insecure" {
description = "Allow insecure connections to Proxmox API"
type = bool
default = true
}
variable "proxmox_ssh_user" {
description = "SSH user for Proxmox node access"
type = string
default = "root"
}
variable "proxmox_node" {
description = "The Proxmox node name where VMs will be created"
type = string
}
variable "proxmox_storage" {
description = "The storage location for VM disks"
type = string
default = "local"
}
variable "proxmox_network_bridge" {
description = "The network bridge to use for VMs"
type = string
default = "vmbr40"
}
# Talos ISO variables
variable "talos_version" {
description = "The Talos version to use"
type = string
default = "v1.9.1"
}
variable "talos_iso_url" {
description = "URL to download Talos ISO (leave empty to use default)"
type = string
default = ""
}
# Cluster variables
variable "cluster_name" {
description = "A name to provide for the Talos cluster"
type = string
}
variable "cluster_endpoint" {
description = "The endpoint for the Talos cluster (e.g., https://10.0.0.100:6443)"
type = string
}
variable "cluster_vip" {
description = "Virtual IP for the cluster control plane (optional, for HA setup)"
type = string
default = ""
}
# VM configuration
variable "vm_id_prefix" {
description = "Starting VM ID prefix (e.g., 800 will create VMs 800, 801, 802...)"
type = number
default = 800
}
variable "controlplane_count" {
description = "Number of control plane nodes"
type = number
default = 3
}
variable "worker_count" {
description = "Number of worker nodes"
type = number
default = 2
}
variable "controlplane_cpu" {
description = "Number of CPU cores for control plane nodes"
type = number
default = 2
}
variable "controlplane_memory" {
description = "Memory in MB for control plane nodes"
type = number
default = 4096
}
variable "controlplane_disk_size" {
description = "Disk size for control plane nodes (e.g., 20G)"
type = number
default = 20
}
variable "worker_cpu" {
description = "Number of CPU cores for worker nodes"
type = number
default = 4
}
variable "worker_memory" {
description = "Memory in MB for worker nodes"
type = number
default = 8192
}
variable "worker_disk_size" {
description = "Disk size for worker nodes (e.g., 50G)"
type = number
default = 10
}
# Network configuration
variable "controlplane_ips" {
description = "List of static IPs for control plane nodes (leave empty for DHCP)"
type = list(string)
default = []
}
variable "worker_ips" {
description = "List of static IPs for worker nodes (leave empty for DHCP)"
type = list(string)
default = []
}
variable "proxmox_region" {
description = "Proxmox region identifier for CCM"
type = string
default = "proxmox"
}
variable "gateway" {
description = "Default gateway for static IP configuration"
type = string
default = ""
}
variable "netmask" {
description = "Network mask (CIDR notation, e.g., 24 for 255.255.255.0)"
type = number
default = 24
}
variable "nameservers" {
description = "List of DNS nameservers for static IP configuration"
type = list(string)
default = ["1.1.1.1", "8.8.8.8"]
}
# Proxmox CCM/CSI token variables
variable "proxmox_ccm_token_secret" {
description = "Proxmox API token secret for Cloud Controller Manager"
type = string
sensitive = true
}
variable "proxmox_csi_token_secret" {
description = "Proxmox API token secret for CSI driver"
type = string
sensitive = true
}