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_file = "Rocky-9.0-x86_64-minimal.iso"
template_description = "Rocky Linux 9.0 Template"
template_name = "rocky-90-cloud"
proxmox_template_description = "Rocky Linux 9.0 Template"
proxmox_template_name = "rocky-90-cloud"
// Communicator Settings

View File

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

View File

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