fix: normalize Proxmox endpoint and stop dashboards self-trigger
Accept Proxmox API endpoints with or without /api2/json in CI and local tfvars, and avoid running the dashboards workflow just because its own workflow file changed during platform migrations.
This commit is contained in:
+8
-1
@@ -14,8 +14,15 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
proxmox_endpoint_normalized = format(
|
||||
"%s/",
|
||||
trimsuffix(replace(trimspace(var.proxmox_endpoint), "/api2/json", ""), "/")
|
||||
)
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
endpoint = var.proxmox_endpoint
|
||||
endpoint = local.proxmox_endpoint_normalized
|
||||
api_token = "${var.proxmox_api_token_id}=${var.proxmox_api_token_secret}"
|
||||
insecure = var.proxmox_insecure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user