Set Proxmox credentials#

Create your access#

Log into the Proxmox cluster or host using ssh then:

> pveum role add Glxforge -privs "Datastore.AllocateSpace Datastore.Audit Pool.Allocate Sys.Audit VM.Allocate VM.Audit VM.Clone VM.Config.CDROM VM.Config.CPU VM.Config.Cloudinit VM.Config.Disk VM.Config.HWType VM.Config.Memory VM.Config.Network VM.Config.Options VM.Monitor VM.PowerMgmt"
> pveum user add glxforge@pve
> pveum aclmod / -user glxforge@pve -role Glxforge
> pveum user token add glxforge@pve terraform

IMPORTANT

Generate a new API token for a specific user. The last command returns API token value, which needs to be stored like advised below.

It cannot be retrieved afterwards!

Configure your workspace#

On your operation host (the one you set up before via Setup workspace):

  • Add this to a hidden file to your workspace:

.env.local#
1export PM_API_TOKEN_ID="glxforge@pve!terraform"
2export PM_API_TOKEN_SECRET="<YOUR TOKEN SECRET>"
3export PM_API_URL="<YOUR PROXMOX API URL>"

Then reload your direnv with:

> direnv reload