Terraform module to manage the following Proxmox resources:
- proxmox_vm_qemu
Copy and paste the following code snippet to your Terraform configuration,
specify the required variables and run the command terraform init.
module "proxmox_vm_qemu" {
source = "gitlab.com/terraform-child-modules-48151/terraform-proxmox-vm-qemu/local"
version = "1.0.1"
}| Name | Version |
|---|---|
| terraform | >= 1.0 |
| proxmox | 3.0.2-rc06 |
| Name | Version |
|---|---|
| proxmox | 3.0.2-rc06 |
No modules.
| Name | Type |
|---|---|
| proxmox_vm_qemu.this | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| agent | Set to 1 to enable the QEMU Guest Agent | number |
0 |
no |
| agent_timeout | Timeout in seconds to keep trying to obtain an IP address from the guest agent one we have a connection | number |
90 |
no |
| automatic_reboot | Automatically reboot the VM when parameter changes require this | bool |
true |
no |
| automatic_reboot_severity | Sets the severity of the error/warning when automatic_reboot is false |
string |
"error" |
no |
| balloon | The minimum amount of memory to allocate to the VM in Megabytes, when Automatic Memory Allocation is desired | number |
0 |
no |
| bios | The BIOS to use, options are seabios or ovmf for UEFI | string |
"seabios" |
no |
| bootdisk | Enable booting from specified disk | string |
null |
no |
| ci_wait | How to long in seconds to wait for before provisioning | number |
30 |
no |
| cicustom | Instead specifying ciuser, cipasword, etc. you can specify the path to a custom cloud-init config file here | string |
null |
no |
| cipassword | Override the default cloud-init user's password | string |
null |
no |
| ciupgrade | Whether to upgrade the packages on the guest during provisioning | bool |
false |
no |
| ciuser | Override the default cloud-init user for provisioning | string |
null |
no |
| clone | The base VM name from which to clone to create the new VM | string |
null |
no |
| clone_id | The base VM id from which to clone to create the new VM | number |
null |
no |
| cpu | The cpu block is used to configure the CPU settings | map(any) |
{} |
no |
| define_connection_info | Whether to let terraform define the (SSH) connection parameters for preprovisioners | bool |
true |
no |
| description | The description of the VM | string |
null |
no |
| disk | The disk block is used to configure the disk devices | list(any) |
[] |
no |
| efidisk | The efidisk block is used to configure the disk used for EFI data storage | map(any) |
{} |
no |
| force_create | If false, and a VM of the same name, on the same node exists, terraform will attempt to reconfigure that VM with these settings | bool |
false |
no |
| force_recreate_on_change_of | If the value of this string changes, the VM will be recreated | string |
null |
no |
| full_clone | Set to true to create a full clone, or false to create a linked clone | bool |
true |
no |
| hagroup | The HA group identifier the resource belongs to (requires hastate to be set!) | string |
null |
no |
| hastate | Requested HA state for the resource | string |
null |
no |
| hotplug | Comma delimited list of hotplug features to enable | string |
"network,disk,usb" |
no |
| ipconfig0 | The first IP address to assign to the gues | string |
"" |
no |
| ipconfig1 | The second IP address to assign to the guest | string |
"" |
no |
| memory | The amount of memory to allocate to the VM in Megabytes | number |
0 |
no |
| name | The name of the VM within Proxmox | string |
n/a | yes |
| nameserver | Sets default DNS server for guest | string |
null |
no |
| network | The network block is used to configure the network devices | list(any) |
[] |
no |
| os_network_config | Network configuration to be copied into the VM when preprovisioning ubuntu or centos guests | string |
null |
no |
| os_type | Which provisioning method to use, based on the OS type | string |
null |
no |
| pci | The pci block is used to configure PCI devices | list(any) |
[] |
no |
| pool | The resource pool to which the VM will be added | string |
null |
no |
| protection | Enable/disable the VM protection from being removed | bool |
false |
no |
| pxe | If set to true, enable PXE boot of the VM | bool |
null |
no |
| qemu_os | The type of OS in the guest | string |
"l26" |
no |
| scsihw | The SCSI controller to emulate | string |
"lsi" |
no |
| searchdomain | Sets default DNS search domain suffix | string |
null |
no |
| serial | The serial block is used to configure the serial devices | list(any) |
[] |
no |
| skip_ipv4 | Tells proxmox that acquiring an IPv4 address from the qemu guest agent isn't required, it will still return an ipv4 address if it could obtain one | bool |
null |
no |
| skip_ipv6 | Tells proxmox that acquiring an IPv6 address from the qemu guest agent isn't required, it will still return an ipv6 address if it could obtain one | bool |
null |
no |
| ssh_forward_ip | The IP (and optional colon separated port), to use to connect to the host for preprovisioning | string |
null |
no |
| ssh_private_key | The private key to use when connecting to the guest for preprovisioning | string |
null |
no |
| ssh_user | The user with which to connect to the guest for preprovisioning | string |
null |
no |
| sshkeys | Newline delimited list of SSH public keys to add to authorized keys file for the cloud-init user | string |
null |
no |
| start_at_node_boot | Whether the guest should start automatically when the Proxmox node boots | bool |
false |
no |
| tablet | Enable/disable the USB tablet device | bool |
true |
no |
| tags | Tags of the VM | string |
null |
no |
| target_node | The name of the Proxmox Node on which to place the VM | string |
null |
no |
| target_nodes | A list of PVE node names on which to place the VM | list(string) |
null |
no |
| usb | The usb block is used to configure USB devices | list(any) |
[] |
no |
| vga | The vga block is used to configure the display device | list(any) |
[] |
no |
| vm_state | The desired state of the VM, options are running, stopped and started | string |
"running" |
no |
| vmid | The ID of the VM in Proxmox | number |
null |
no |
| Name | Description |
|---|---|
| default_ipv4_address | The default IPv4 address |
| default_ipv6_address | The default IPv6 address |
| ssh_host | The hostname or IP to use to connect to the VM for preprovisioning |
| ssh_port | The port to connect to the VM over SSH for preprovisioning |
Created and maintained by Dennis Hoppe.
Apache 2 licensed. See LICENSE for full details.