227 lines
4.8 KiB
HCL
227 lines
4.8 KiB
HCL
# Vultr Variables
|
|
variable "vultr_api_key" {
|
|
description = "Vultr API key"
|
|
type = string
|
|
sensitive = true
|
|
default = ""
|
|
}
|
|
|
|
|
|
|
|
# Proxmox Variables
|
|
variable "proxmox_api_url" {
|
|
description = "Proxmox API URL"
|
|
type = string
|
|
default = "https://10.0.16.231:8006"
|
|
}
|
|
|
|
variable "proxmox_user" {
|
|
description = "Proxmox user for authentication"
|
|
type = string
|
|
default = "root@pam"
|
|
}
|
|
|
|
variable "proxmox_password" {
|
|
description = "Proxmox password"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "proxmox_tls_insecure" {
|
|
description = "Allow insecure TLS connections to Proxmox"
|
|
type = bool
|
|
default = true
|
|
}
|
|
|
|
variable "proxmox_nodes" {
|
|
description = "List of Proxmox nodes to distribute VMs across"
|
|
type = list(string)
|
|
default = ["lab02", "lab03", "lab04"]
|
|
}
|
|
|
|
variable "cluster_name" {
|
|
description = "Name prefix for the K3s cluster nodes"
|
|
type = string
|
|
default = "home-k3s"
|
|
}
|
|
|
|
variable "vm_template" {
|
|
description = "Name of the VM template to clone"
|
|
type = string
|
|
default = "debian-13-cloudinit"
|
|
}
|
|
|
|
variable "storage_pool" {
|
|
description = "Storage pool for VM disks"
|
|
type = string
|
|
default = "ceph"
|
|
}
|
|
|
|
variable "network_bridge" {
|
|
description = "Network bridge to use for VMs"
|
|
type = string
|
|
default = "vmbr0"
|
|
}
|
|
|
|
variable "network_cidr" {
|
|
description = "Network CIDR for the cluster"
|
|
type = string
|
|
default = "10.0.16.0/22"
|
|
}
|
|
|
|
variable "network_gateway" {
|
|
description = "Network gateway"
|
|
type = string
|
|
default = "10.0.19.254"
|
|
}
|
|
|
|
variable "control_plane_count" {
|
|
description = "Number of control plane nodes"
|
|
type = number
|
|
default = 3
|
|
}
|
|
|
|
variable "control_plane_cores" {
|
|
description = "Number of CPU cores for control plane nodes"
|
|
type = number
|
|
default = 2
|
|
}
|
|
|
|
variable "control_plane_memory" {
|
|
description = "Memory in MB for control plane nodes"
|
|
type = number
|
|
default = 8192
|
|
}
|
|
|
|
variable "control_plane_disk_size" {
|
|
description = "Disk size for control plane nodes (in GB)"
|
|
type = number
|
|
default = 32
|
|
}
|
|
|
|
variable "control_plane_ip_start" {
|
|
description = "Starting IP offset for control plane nodes"
|
|
type = number
|
|
default = 868 # 10.0.19.100 = offset 868 from 10.0.16.0 (3*256 + 100)
|
|
}
|
|
|
|
variable "worker_count" {
|
|
description = "Number of worker nodes"
|
|
type = number
|
|
default = 3
|
|
}
|
|
|
|
variable "worker_cores" {
|
|
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 (in GB)"
|
|
type = number
|
|
default = 64
|
|
}
|
|
|
|
variable "worker_ip_start" {
|
|
description = "Starting IP offset for worker nodes"
|
|
type = number
|
|
default = 878 # 10.0.19.110 = offset 878 from 10.0.16.0 (3*256 + 110)
|
|
}
|
|
|
|
variable "ssh_user" {
|
|
description = "SSH user for the VMs"
|
|
type = string
|
|
default = "debian"
|
|
}
|
|
|
|
variable "ssh_public_key" {
|
|
description = "SSH public key for access to VMs"
|
|
type = string
|
|
default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHLyVSEEAEbGZZqwPwEup0XrlTpu3x3iF9ExvvQPA4xN graham@mcintire.me"
|
|
}
|
|
|
|
# DNS Provider Variables
|
|
variable "dnsimple_token" {
|
|
description = "DNSimple API token"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "dnsimple_account" {
|
|
description = "DNSimple account ID"
|
|
type = string
|
|
default = "143471"
|
|
}
|
|
|
|
variable "porkbun_api_key" {
|
|
description = "Porkbun API key"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "porkbun_secret_api_key" {
|
|
description = "Porkbun secret API key"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "pdns_api_key" {
|
|
description = "PowerDNS API key"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "pdns_server_url" {
|
|
description = "PowerDNS server URL"
|
|
type = string
|
|
default = "http://ns1.vntx.net:8081"
|
|
}
|
|
|
|
variable "pdns_vultr_api_key" {
|
|
description = "PowerDNS Vultr API key"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
# Legacy Proxmox Variables (from vars.tf)
|
|
variable "proxmox_host" {
|
|
description = "Proxmox host for VM deployment"
|
|
type = string
|
|
default = "vm2-380"
|
|
}
|
|
|
|
variable "template_name" {
|
|
description = "VM template name"
|
|
type = string
|
|
default = "ubuntu"
|
|
}
|
|
|
|
variable "nic_name" {
|
|
description = "Network interface name"
|
|
type = string
|
|
default = "vmbr0"
|
|
}
|
|
|
|
variable "api_url" {
|
|
description = "Proxmox API URL (legacy)"
|
|
type = string
|
|
default = "https://10.0.0.2:8006/api2/json"
|
|
}
|
|
|
|
variable "token_secret" {
|
|
description = "Proxmox token secret"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "token_id" {
|
|
description = "Proxmox token ID"
|
|
type = string
|
|
}
|