Skip to content

Commit

Permalink
Merge pull request #5 from FriedCircuits/feature/disk-storage
Browse files Browse the repository at this point in the history
Use vars for storage config
  • Loading branch information
FriedCircuits authored Nov 23, 2021
2 parents 3b6ea93 + c52feeb commit 11d23ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions modules/proxmox/vm-clone/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ resource "proxmox_vm_qemu" "vm" {

disk {
slot = 0
storage = "local-lvm"
type = "virtio"
storage = var.specs.disk_storage
type = var.specs.disk_type
size = var.specs.disk_size
}

Expand Down
20 changes: 12 additions & 8 deletions modules/proxmox/vm-clone/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,20 @@ variable "agent_enabled" {
variable "specs" {
description = "CPU, Mem settings per VM."
type = object({
cores = number
sockets = number
memory = number
disk_size = string
cores = number
sockets = number
memory = number
disk_size = string
disk_storage = string
disk_type = string
})
default = {
cores = 1
sockets = 1
memory = 2048
disk_size = "30G"
cores = 1
sockets = 1
memory = 2048
disk_size = "30G"
disk_storage = "local-lvm"
disk_type = "virtio"
}
}

Expand Down

0 comments on commit 11d23ac

Please sign in to comment.