Skip to content

Commit

Permalink
chore: remove hardcoded config for VM resource (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
hazmei authored Jul 17, 2024
1 parent 2be9a7f commit 0f8c3ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "proxmox_cloud_init_disk" "this" {
storage = var.storage_name

meta_data = yamlencode({
instance_id = sha1(var.name)
instance_id = sha1("${var.name}-${count.index}")
local-hostname = "${var.name}-${count.index}"
})

Expand Down Expand Up @@ -49,10 +49,10 @@ resource "proxmox_vm_qemu" "this" {

cpu = "x86-64-v2-AES"

cores = 2
vcpus = 2
sockets = 1
memory = 2560
cores = var.resource_allocation.cores
vcpus = var.resource_allocation.vcpus
sockets = var.resource_allocation.sockets
memory = var.resource_allocation.memory

scsihw = "virtio-scsi-single"
os_type = "cloud-init" # cloud-init, # ubuntu, # centos
Expand Down

0 comments on commit 0f8c3ae

Please sign in to comment.