homelab/terraform/proxmox-examples/docker-host/variables.tf
Claude 460610986c
docs: Add non-root SSH user support for Terraform
- Updated documentation for users who disable root SSH
- Added setup instructions for non-root user with sudo access
- Configured write permissions for /var/lib/vz/snippets
- Added Option A (root) and Option B (non-root) SSH setup guides
- Enhanced troubleshooting for permission denied errors
- Updated terraform.tfvars.example with non-root user example
2025-11-11 06:28:37 +00:00

187 lines
4.1 KiB
HCL

variable "pm_api_url" {
description = "Proxmox API URL"
type = string
default = "https://proxmox.local:8006"
}
variable "pm_api_token_id" {
description = "Proxmox API token ID (format: user@realm!tokenid)"
type = string
default = "root@pam!terraform"
}
variable "pm_api_token_secret" {
description = "Proxmox API token secret"
type = string
sensitive = true
}
variable "pm_tls_insecure" {
description = "Disable TLS verification for self-signed certificates"
type = bool
default = true
}
variable "pm_ssh_username" {
description = "SSH username for Proxmox host (used for uploading cloud-init files). Use your personal user if root SSH is disabled."
type = string
default = "root"
}
variable "proxmox_node" {
description = "Proxmox node name"
type = string
default = "pve"
}
variable "vm_name" {
description = "VM name"
type = string
default = "docker-host"
}
variable "template_vm_id" {
description = "Template VM ID to clone from"
type = number
default = 9000
}
variable "vm_cores" {
description = "Number of CPU cores"
type = number
default = 4
}
variable "vm_memory" {
description = "Memory in MB"
type = number
default = 8192
}
variable "disk_size" {
description = "Disk size (e.g., 50G, 100G)"
type = string
default = "50"
}
variable "storage" {
description = "Storage pool name for VM disks"
type = string
default = "local-lvm"
}
variable "snippets_storage" {
description = "Storage pool name for cloud-init snippets (must support 'snippets' content type)"
type = string
default = "local"
}
variable "network_bridge" {
description = "Network bridge"
type = string
default = "vmbr0"
}
variable "vm_ip_address" {
description = "Static IP address or 'dhcp'"
type = string
default = "dhcp"
}
variable "vm_ip_netmask" {
description = "Network netmask (CIDR notation, e.g., 24)"
type = number
default = 24
}
variable "vm_gateway" {
description = "Network gateway"
type = string
default = "192.168.1.1"
}
variable "vm_username" {
description = "VM username"
type = string
default = "ubuntu"
}
variable "vm_password" {
description = "VM user password"
type = string
sensitive = true
}
variable "vm_ssh_keys" {
description = "List of SSH public keys"
type = list(string)
default = []
}
variable "vm_timezone" {
description = "VM timezone"
type = string
default = "America/Los_Angeles"
}
variable "clone_homelab_repo" {
description = "Clone homelab repository on first boot"
type = bool
default = false
}
variable "github_username" {
description = "GitHub username for homelab repo"
type = string
default = "efigueroa"
}
# GPU Passthrough Configuration
variable "enable_gpu_passthrough" {
description = "Enable GPU passthrough (NVIDIA GTX 1070)"
type = bool
default = false
}
variable "gpu_pci_id" {
description = "GPU PCI ID (e.g., 0000:01:00)"
type = string
default = "0000:01:00"
}
# Media Directory Mount Configuration
variable "mount_media_directories" {
description = "Mount media directories from Proxmox host via NFS"
type = bool
default = true
}
variable "proxmox_host_ip" {
description = "Proxmox host IP address for NFS mounts"
type = string
default = "192.168.1.1"
}
variable "media_source_path" {
description = "Source path on Proxmox host for media directories"
type = string
default = "/data/media"
}
variable "media_mount_path" {
description = "Mount path in VM for media directories"
type = string
default = "/media"
}
# Operating System
variable "vm_os_type" {
description = "VM OS type (ubuntu, almalinux, debian)"
type = string
default = "almalinux"
validation {
condition = contains(["ubuntu", "almalinux", "debian"], var.vm_os_type)
error_message = "OS type must be ubuntu, almalinux, or debian"
}
}