telmate to bpg provider switch

This commit is contained in:
nick committed 2026-09-08 04:08:13 +00:00
1 parent e4feb7ed7d
commit 954b488565
4 files changed
+20 -16

No files matched your search

Submodule opentofu updated: db481e796d...aabd3838f7.
+11 -12
View File
@@ -1,8 +1,8 @@
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = "3.0.2-rc04"
source = "bpg/proxmox"
version = "0.112.0"
}
local = {
source = "hashicorp/local"
@@ -65,18 +65,17 @@ data "external" "infisical" {
# nest_custom_fields = false
# }
# One provider alias per hypervisor. The API token is "user@realm!tokenid=secret".
provider "proxmox" {
alias = "proxmox"
pm_api_url = var.hypervisors["proxmox"].api_url
pm_api_token_id = data.external.infisical.result["token_id"]
pm_api_token_secret = data.external.infisical.result["hv2_token_secret"]
pm_tls_insecure = true
alias = "proxmox"
endpoint = trimsuffix(var.hypervisors["proxmox"].api_url, "/api2/json")
api_token = "${data.external.infisical.result["token_id"]}=${data.external.infisical.result["hv2_token_secret"]}"
insecure = true
}
provider "proxmox" {
alias = "goose"
pm_api_url = var.hypervisors["goose"].api_url
pm_api_token_id = data.external.infisical.result["token_id"]
pm_api_token_secret = data.external.infisical.result["goose_token_secret"]
pm_tls_insecure = true
alias = "goose"
endpoint = trimsuffix(var.hypervisors["goose"].api_url, "/api2/json")
api_token = "${data.external.infisical.result["token_id"]}=${data.external.infisical.result["goose_token_secret"]}"
insecure = true
}
+4 -2
View File
@@ -2,12 +2,12 @@
hypervisors = {
proxmox = {
api_url = "https://192.168.7.240:8006/api2/json"
api_url = "https://192.168.7.240:8006/"
node_name = "pve"
storage = "local-lvm"
}
goose = {
api_url = "https://192.168.7.241:8006/api2/json"
api_url = "https://192.168.7.241:8006/"
node_name = "goose"
storage = "local-lvm"
}
@@ -175,6 +175,7 @@ nodes = {
disk_size = "32G"
nic_name = "eth0"
bridge = "vmbr0"
vlan = 1
ip = "192.168.0.200/24"
nameserver = "192.168.0.2"
gw = "192.168.0.1"
@@ -191,6 +192,7 @@ nodes = {
disk_size = "32G"
nic_name = "eth0"
bridge = "vmbr0"
vlan = 1
ip = "192.168.0.202/24"
nameserver = "192.168.0.2"
gw = "192.168.0.1"
+4 -1
View File
@@ -1,7 +1,7 @@
variable "hypervisors" {
description = "Per-hypervisor configuration. Keys must match provider aliases in providers.tf (e.g. hv2, hv3)."
type = map(object({
api_url = string
api_url = string # e.g. https://192.168.1.10:8006/
node_name = string
storage = string
}))
@@ -106,14 +106,17 @@ variable "nodes" {
hostname = string
vmid = number
template = string
os_type = optional(string, "debian")
unprivileged = bool
onboot = bool
tags = string
cores = optional(number, 1)
memory = number
swap = number
disk_size = string
nic_name = string
bridge = string
vlan = optional(number)
ip = string
nameserver = optional(string)
gw = string