2022-08-06 20:17:14 +00:00
|
|
|
// Proxmox Settings
|
|
|
|
variable "proxmox_iso_file" {
|
2022-09-08 19:12:44 +00:00
|
|
|
type = string
|
|
|
|
description = "Path to the ISO file to boot from, expressed as a proxmox datastore path."
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "proxmox_iso_pool" {
|
2022-09-08 19:12:44 +00:00
|
|
|
type = string
|
|
|
|
description = "Storage pool where the ISO file is stored."
|
|
|
|
default = "local:iso"
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "proxmox_url" {
|
2022-09-08 19:12:44 +00:00
|
|
|
type = string
|
|
|
|
description = "URL to the Proxmox API, including the full path."
|
2022-09-09 08:29:00 +00:00
|
|
|
sensitive = true
|
|
|
|
default = ""
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "proxmox_node" {
|
2022-09-08 19:12:44 +00:00
|
|
|
type = string
|
|
|
|
description = "Name of a node in the Proxmox cluster on which to start the virtual machine when it is created."
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
2022-09-09 08:29:00 +00:00
|
|
|
variable "proxmox_username" {
|
|
|
|
type = string
|
|
|
|
description = "The username must include the token id after an exclamation mark."
|
|
|
|
sensitive = true
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-09-08 19:12:44 +00:00
|
|
|
variable "proxmox_token" {
|
|
|
|
type = string
|
|
|
|
description = "Token for authenticating API calls."
|
2022-09-09 08:29:00 +00:00
|
|
|
sensitive = true
|
|
|
|
default = ""
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "proxmox_storage_format" {
|
2022-09-08 19:12:44 +00:00
|
|
|
type = string
|
|
|
|
description = "The format of the disk."
|
|
|
|
default = "raw"
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "proxmox_storage_pool" {
|
2022-09-08 19:12:44 +00:00
|
|
|
type = string
|
|
|
|
description = "Name of the Proxmox storage pool where the virtual machine hard disk will be stored."
|
|
|
|
default = "local-lvm"
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
2022-09-08 19:12:44 +00:00
|
|
|
variable "proxmox_template_description" {
|
|
|
|
type = string
|
|
|
|
description = "Description of the template, visible in the Proxmox interface."
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
2022-09-08 19:12:44 +00:00
|
|
|
variable "proxmox_template_name" {
|
|
|
|
type = string
|
|
|
|
description = "Description of the template, visible in the Proxmox interface."
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Virtual Machine Settings
|
|
|
|
variable "vm_id" {
|
|
|
|
type = number
|
|
|
|
description = "The ID used to reference the virtual machine."
|
2022-09-08 19:12:44 +00:00
|
|
|
default = 900
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_guest_os_language" {
|
|
|
|
type = string
|
|
|
|
description = "The guest operating system lanugage."
|
|
|
|
default = "en_US"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_guest_os_keyboard" {
|
|
|
|
type = string
|
|
|
|
description = "The guest operating system keyboard input."
|
|
|
|
default = "us"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_guest_os_timezone" {
|
|
|
|
type = string
|
|
|
|
description = "The guest operating system timezone."
|
|
|
|
default = "America/New_York"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_os_type" {
|
|
|
|
type = string
|
|
|
|
description = "The operating system."
|
|
|
|
default = "l26"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_cpu_sockets" {
|
|
|
|
type = number
|
2022-09-08 19:12:44 +00:00
|
|
|
description = "The number of virtual CPUs sockets."
|
2022-08-06 20:17:14 +00:00
|
|
|
default = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_cpu_cores" {
|
|
|
|
type = number
|
2022-09-08 19:12:44 +00:00
|
|
|
description = "The number of virtual CPUs cores per socket."
|
2022-08-06 20:17:14 +00:00
|
|
|
default = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_cpu_type" {
|
|
|
|
type = string
|
|
|
|
description = "The CPU type to emulate."
|
2024-01-14 16:18:58 +00:00
|
|
|
default = "x86-64-v2-AES"
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_mem_size" {
|
|
|
|
type = number
|
2022-09-08 19:12:44 +00:00
|
|
|
description = "The size for the virtual memory in MB."
|
2022-08-06 20:17:14 +00:00
|
|
|
default = 1024
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_disk_size" {
|
|
|
|
type = string
|
2022-09-08 19:12:44 +00:00
|
|
|
description = "The size for the virtual disk."
|
2022-09-09 08:29:00 +00:00
|
|
|
default = "20G"
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_disk_controller_type" {
|
|
|
|
type = list(string)
|
2022-09-08 19:12:44 +00:00
|
|
|
description = "The virtual disk controller types in sequence."
|
2022-08-06 20:17:14 +00:00
|
|
|
default = ["pvscsi"]
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_disk_thin_provisioned" {
|
|
|
|
type = bool
|
|
|
|
description = "Thin provision the virtual disk."
|
|
|
|
default = true
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_network_adapter_model" {
|
|
|
|
type = string
|
2022-09-08 19:12:44 +00:00
|
|
|
description = "Model of the virtual network adapter."
|
2024-01-14 16:18:58 +00:00
|
|
|
default = "virtio"
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_network_adapter_bridge" {
|
|
|
|
type = string
|
|
|
|
description = "Which Proxmox bridge to attach the adapter to."
|
|
|
|
default = "vmbr0"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_network_adapter_vlan_tag" {
|
|
|
|
type = string
|
|
|
|
description = "If the adapter should tag packets."
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-08-10 14:01:24 +00:00
|
|
|
variable "vm_cloud_init" {
|
|
|
|
type = bool
|
|
|
|
description = "Add a Cloud-Init CDROM drive after the virtual machine has been converted."
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_cloud_init_storage_pool" {
|
|
|
|
type = string
|
|
|
|
description = "Name of the Proxmox storage pool to store the Cloud-Init CDROM on."
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "vm_qemu_agent" {
|
|
|
|
type = bool
|
|
|
|
description = "Enables QEMU Agent option for this VM."
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
2024-01-14 16:18:58 +00:00
|
|
|
variable "http_interface" {
|
|
|
|
type = string
|
|
|
|
description = "Name of the network interface that Packer gets HTTPIP from."
|
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-08-06 20:17:14 +00:00
|
|
|
// Communicator Settings and Credentials
|
|
|
|
variable "build_password" {
|
|
|
|
type = string
|
2022-09-09 08:29:00 +00:00
|
|
|
description = "The password to login the guest operating system."
|
2022-08-06 20:17:14 +00:00
|
|
|
sensitive = true
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "build_password_encrypted" {
|
|
|
|
type = string
|
|
|
|
description = "The encrypted password to login the guest operating system."
|
|
|
|
sensitive = true
|
|
|
|
}
|
|
|
|
|
2022-09-09 08:29:00 +00:00
|
|
|
variable "build_scripts" {
|
|
|
|
type = list(string)
|
|
|
|
description = "A list of scripts and their relative paths to transfer and execute."
|
|
|
|
default = []
|
2022-08-06 20:17:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "communicator_timeout" {
|
|
|
|
type = string
|
|
|
|
description = "The timeout for the communicator protocol."
|
|
|
|
default = "30m"
|
|
|
|
}
|