fix: switch to API token authentication for Proxmox
Some checks failed
Gitea Actions Demo / Terraform Plan (push) Failing after 11s
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:
@@ -18,7 +18,8 @@ jobs:
|
||||
env:
|
||||
TF_VAR_SSH_KEY_PUBLIC: ${{ secrets.SSH_KEY_PUBLIC }}
|
||||
TF_VAR_TS_AUTHKEY: ${{ secrets.TS_AUTHKEY }}
|
||||
TF_VAR_proxmox_password: ${{ secrets.PROXMOX_PASSWORD }}
|
||||
TF_VAR_pm_api_token_id: ${{ secrets.PM_API_TOKEN_ID }}
|
||||
TF_VAR_pm_api_token_secret: ${{ secrets.PM_API_TOKEN_SECRET }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -19,7 +19,8 @@ jobs:
|
||||
env:
|
||||
TF_VAR_SSH_KEY_PUBLIC: ${{ secrets.SSH_KEY_PUBLIC }}
|
||||
TF_VAR_TS_AUTHKEY: ${{ secrets.TS_AUTHKEY }}
|
||||
TF_VAR_proxmox_password: ${{ secrets.PROXMOX_PASSWORD }}
|
||||
TF_VAR_pm_api_token_id: ${{ secrets.PM_API_TOKEN_ID }}
|
||||
TF_VAR_pm_api_token_secret: ${{ secrets.PM_API_TOKEN_SECRET }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -9,8 +9,8 @@ terraform {
|
||||
|
||||
provider "proxmox" {
|
||||
pm_api_url = var.pm_api_url
|
||||
pm_user = var.pm_user
|
||||
pm_password = var.proxmox_password
|
||||
pm_api_token_id = var.pm_api_token_id
|
||||
pm_api_token_secret = var.pm_api_token_secret
|
||||
pm_tls_insecure = true
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
variable "proxmox_password" {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user