fix: switch to API token authentication for Proxmox
Some checks failed
Gitea Actions Demo / Terraform Plan (push) Failing after 11s

- Replace user/password auth with API token auth
- Update provider config to use pm_api_token_id and pm_api_token_secret
- Update workflow secrets to use PM_API_TOKEN_ID and PM_API_TOKEN_SECRET
- Remove unused pm_user and proxmox_password variables
This commit is contained in:
2026-02-27 20:02:22 +00:00
parent 79b535bb59
commit c8b86c7443
5 changed files with 18 additions and 13 deletions

View File

@@ -8,10 +8,10 @@ terraform {
}
provider "proxmox" {
pm_api_url = var.pm_api_url
pm_user = var.pm_user
pm_password = var.proxmox_password
pm_tls_insecure = true
pm_api_url = var.pm_api_url
pm_api_token_id = var.pm_api_token_id
pm_api_token_secret = var.pm_api_token_secret
pm_tls_insecure = true
}
resource "proxmox_vm_qemu" "alpacas" {

View File

@@ -7,4 +7,4 @@ sockets = 1
bridge = "vmbr0"
storage = "Flash"
pm_api_url = "https://100.105.0.115:8006/api2/json"
pm_user = "terraform-prov@pve"
pm_api_token_id = "terraform-prov@pve!mytoken"

View File

@@ -1,5 +1,12 @@
variable "proxmox_password" {
type = string
variable "pm_api_token_id" {
type = string
description = "Proxmox API token ID (format: user@realm!tokenid)"
}
variable "pm_api_token_secret" {
type = string
sensitive = true
description = "Proxmox API token secret"
}
variable "target_node" {
@@ -38,10 +45,6 @@ variable "pm_api_url" {
type = string
}
variable "pm_user" {
type = string
}
variable "alpaca_vm_count" {
type = number
default = 1