diff --git a/prepare-labs/terraform/providers/proxmox/config.tf b/prepare-labs/terraform/providers/proxmox/config.tf index 105e67d4..e6c3308d 100644 --- a/prepare-labs/terraform/providers/proxmox/config.tf +++ b/prepare-labs/terraform/providers/proxmox/config.tf @@ -13,6 +13,11 @@ variable "proxmox_password" { default = null } +variable "proxmox_storage" { + type = string + default = "local" +} + variable "proxmox_template_node_name" { type = string default = null diff --git a/prepare-labs/terraform/virtual-machines/proxmox/main.tf b/prepare-labs/terraform/virtual-machines/proxmox/main.tf index e767bc76..b74c8754 100644 --- a/prepare-labs/terraform/virtual-machines/proxmox/main.tf +++ b/prepare-labs/terraform/virtual-machines/proxmox/main.tf @@ -18,7 +18,7 @@ resource "proxmox_virtual_environment_vm" "_" { dedicated = split(" ", each.value.node_size)[1] } #disk { - # datastore_id = "ceph" + # datastore_id = var.proxmox_storage # file_id = proxmox_virtual_environment_file._.id # interface = "scsi0" # size = 30 @@ -33,7 +33,7 @@ resource "proxmox_virtual_environment_vm" "_" { enabled = true } initialization { - datastore_id = "ceph" + datastore_id = var.proxmox_storage user_account { username = "ubuntu" keys = [trimspace(tls_private_key.ssh.public_key_openssh)] diff --git a/prepare-labs/terraform/virtual-machines/proxmox/tfvars.example b/prepare-labs/terraform/virtual-machines/proxmox/tfvars.example index e86f5ef7..837b9826 100644 --- a/prepare-labs/terraform/virtual-machines/proxmox/tfvars.example +++ b/prepare-labs/terraform/virtual-machines/proxmox/tfvars.example @@ -8,6 +8,9 @@ proxmox_endpoint = "https://localhost:8006/" proxmox_username = "terraform@pve" proxmox_password = "CHANGEME" +# Which storage to use for VM disks. Defaults to "local". +#proxmox_storage = "ceph" + proxmox_template_node_name = "CHANGEME" proxmox_template_vm_id = CHANGEME