Skip to content

hazmei/terraform-proxmox-vm-nocloud

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-proxmox-vm-nocloud

Terraform module for provisioning proxmox VM with nocloud

Usage

module "vm-nocloud" {
  source  = "sparrow-bork/vm-nocloud/proxmox"
  version = "~> 0.0.1"

  name              = "test"
  vm_count          = 3
  target_node       = "pve"
  storage_name      = "ssd"
  user_data         = ""
  vm_onboot         = true
  vm_state          = "running"
  vm_protection     = true
  bootable_iso      = "ssd:iso/talos-nocloud-amd64.iso"

  resource_allocation = {
    sockets = 1
    cores   = 1
    vcpus   = 1
    memory  = 512
    storage = 128
  }

  network = {
    ip_subnet  = "192.168.1.0"
    ip_hostnum = 10
    ip_prefix  = 24
    ip_gateway = "192.168.1.1"
  }
}

Requirements

Name Version
terraform >= 1.5.0
proxmox 3.0.1-rc3
time >= 0.11.2

Providers

Name Version
proxmox 3.0.1-rc3

Modules

No modules.

Resources

Name Type
proxmox_cloud_init_disk.this resource
proxmox_vm_qemu.this resource

Inputs

Name Description Type Default Required
bootable_iso The ISO file name to boot from string n/a yes
name The suffix to use for the cloud-init and VM string n/a yes
network The network configuration for ip cidr, hostnum, gateway, and dns nameserver
object({
ip_subnet = optional(string, "10.255.0.0")
ip_hostnum = optional(number, 200)
ip_prefix = optional(number, 24)
ip_gateway = string
dns_nameservers = optional(list(string), ["1.1.1.1", "8.8.8.8"])
})
n/a yes
resource_allocation The resource amount to allocation for CPU, Memory, and Storage
object({
cores = optional(number, 1)
vcpus = optional(number, 1)
sockets = optional(number, 1)
memory = optional(number, 256)
storage = optional(string, 128)
})
{
"cores": 1,
"memory": 256,
"sockets": 1,
"storage": 128,
"vcpus": 1
}
no
skip_vm_id The number to increment for VM ids number 0 no
storage_name The storage to deploy to string "ssd" no
target_node The target node to deploy to string "pve" no
user_data The user-data config to supply for cloud-init string "" no
vm_count Number of VMs to create number 1 no
vm_onboot Whether to have the VM startup after PVE node starts bool false no
vm_protection Enable/disable the VM protection from being removed bool false no
vm_state The state of the VM after creation string "running" no

Outputs

No outputs.

About

Terraform module for provisioning proxmox VM with nocloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%