fix: fix variable names and missing descriptions

This commit is contained in:
Robert Kaussow 2022-09-08 21:12:44 +02:00
parent 2fed1bb8c6
commit 016f414b08
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
4 changed files with 41 additions and 40 deletions

View File

@ -10,8 +10,8 @@ vm_qemu_agent = true
proxmox_iso_pool = "local:iso" proxmox_iso_pool = "local:iso"
proxmox_iso_file = "Rocky-9.0-x86_64-minimal.iso" proxmox_iso_file = "Rocky-9.0-x86_64-minimal.iso"
template_description = "Rocky Linux 9.0 Template" proxmox_template_description = "Rocky Linux 9.0 Template"
template_name = "rocky-90-cloud" proxmox_template_name = "rocky-90-cloud"
// Communicator Settings // Communicator Settings

View File

@ -26,8 +26,7 @@ source "proxmox-iso" "rocky-linux-90" {
// Proxmox Settings // Proxmox Settings
proxmox_url = "${var.proxmox_url}" proxmox_url = "${var.proxmox_url}"
node = "${var.proxmox_node}" node = "${var.proxmox_node}"
username = "${var.proxmox_username}" token = "${var.proxmox_token}"
password = "${var.proxmox_password}"
// Virtual Machine Settings // Virtual Machine Settings
vm_id = "${var.vm_id}" vm_id = "${var.vm_id}"
@ -76,8 +75,8 @@ source "proxmox-iso" "rocky-linux-90" {
ssh_port = "${var.communicator_port}" ssh_port = "${var.communicator_port}"
ssh_timeout = "${var.communicator_timeout}" ssh_timeout = "${var.communicator_timeout}"
template_description = "${var.template_description} on ${local.buildtime}" proxmox_template_description = "${var.proxmox_template_description} on ${local.buildtime}"
template_name = "${var.template_name}" proxmox_template_name = "${var.proxmox_template_name}"
unmount_iso = true unmount_iso = true
} }

View File

@ -1,61 +1,63 @@
// Proxmox Settings // Proxmox Settings
variable "proxmox_iso_file" { variable "proxmox_iso_file" {
type = string type = string
description = "Path to the ISO file to boot from, expressed as a proxmox datastore path."
} }
variable "proxmox_iso_pool" { variable "proxmox_iso_pool" {
type = string type = string
description = "Storage pool where the ISO file is stored."
default = "local:iso" default = "local:iso"
} }
variable "proxmox_url" { variable "proxmox_url" {
type = string type = string
default = "" description = "URL to the Proxmox API, including the full path."
} }
variable "proxmox_node" { variable "proxmox_node" {
type = string type = string
default = "" description = "Name of a node in the Proxmox cluster on which to start the virtual machine when it is created."
} }
variable "proxmox_username" { variable "proxmox_token" {
type = string type = string
default = "" description = "Token for authenticating API calls."
}
variable "proxmox_password" {
type = string
default = ""
} }
variable "proxmox_storage_format" { variable "proxmox_storage_format" {
type = string type = string
description = "The format of the disk."
default = "raw" default = "raw"
} }
variable "proxmox_storage_pool" { variable "proxmox_storage_pool" {
type = string type = string
description = "Name of the Proxmox storage pool where the virtual machine hard disk will be stored."
default = "local-lvm" default = "local-lvm"
} }
variable "proxmox_storage_pool_type" { variable "proxmox_storage_pool_type" {
type = string type = string
description = "The type of the storage pool."
default = "lvm-thin" default = "lvm-thin"
} }
variable "template_description" { variable "proxmox_template_description" {
type = string type = string
description = "Description of the template, visible in the Proxmox interface."
} }
variable "template_name" { variable "proxmox_template_name" {
type = string type = string
description = "Description of the template, visible in the Proxmox interface."
} }
// Virtual Machine Settings // Virtual Machine Settings
variable "vm_id" { variable "vm_id" {
type = number type = number
description = "The ID used to reference the virtual machine." description = "The ID used to reference the virtual machine."
default = 0 default = 900
} }
variable "vm_guest_os_language" { variable "vm_guest_os_language" {
@ -84,13 +86,13 @@ variable "vm_os_type" {
variable "vm_cpu_sockets" { variable "vm_cpu_sockets" {
type = number type = number
description = "The number of virtual CPUs sockets. (e.g. '2')" description = "The number of virtual CPUs sockets."
default = 1 default = 1
} }
variable "vm_cpu_cores" { variable "vm_cpu_cores" {
type = number type = number
description = "The number of virtual CPUs cores per socket. (e.g. '1')" description = "The number of virtual CPUs cores per socket."
default = 1 default = 1
} }
@ -102,19 +104,19 @@ variable "vm_cpu_type" {
variable "vm_mem_size" { variable "vm_mem_size" {
type = number type = number
description = "The size for the virtual memory in MB. (e.g. '2048')" description = "The size for the virtual memory in MB."
default = 1024 default = 1024
} }
variable "vm_disk_size" { variable "vm_disk_size" {
type = string type = string
description = "The size for the virtual disk in MB. (e.g. '8G')" description = "The size for the virtual disk."
default = "32G" default = "32G"
} }
variable "vm_disk_controller_type" { variable "vm_disk_controller_type" {
type = list(string) type = list(string)
description = "The virtual disk controller types in sequence. (e.g. 'pvscsi')" description = "The virtual disk controller types in sequence."
default = ["pvscsi"] default = ["pvscsi"]
} }
@ -126,7 +128,7 @@ variable "vm_disk_thin_provisioned" {
variable "vm_network_adapter_model" { variable "vm_network_adapter_model" {
type = string type = string
description = "Model of the virtual network adapter. (e.g. 'vmxnet3' or 'e1000e')" description = "Model of the virtual network adapter."
default = "e1000" default = "e1000"
} }
@ -163,7 +165,7 @@ variable "vm_qemu_agent" {
// Communicator Settings and Credentials // Communicator Settings and Credentials
variable "build_username" { variable "build_username" {
type = string type = string
description = "The username to login to the guest operating system. (e.g. rainpole)" description = "The username to login to the guest operating system."
sensitive = true sensitive = true
} }