fvumbaca / terraform-proxmox-k3s

A terraform module to get k3s up and running on Proxmox VE real quick.
MIT License
83 stars 44 forks source link

Feature: Ability to specify start vmid for node creation #16

Open mannp opened 2 years ago

mannp commented 2 years ago

I found a couple of issues with the existing auto numbering using a free vmid (-1)

Firstly, I tried to create two separate clusters on the same proxmox host and while the first completed successfully, the second cluster started to destroy and overwrite the first cluster, as it used the same vmids.

So I found the -1 for vmid was not working in this instance.

Secondly, I found that if I wanted to keep consecutive vmids for nodes in the same cluster, I was unable to add a third say master node as the first worker node had taken that vmid.

This may appear to be cosmetic, but when the pve has multiple other vm's it all becomes a bit of a mess.

I guess one cluster per pve, might work, but specifying a starting vmid allows you to separate cluster 1 to vmid_start = 4000 and cluster 2 vmid_start = 5000.

This is an updated https://github.com/fvumbaca/terraform-proxmox-k3s/pull/13