Files
oswald-infra/providers.tf
T
2026-06-25 23:27:25 -07:00

37 lines
1.1 KiB
Terraform

terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = "3.0.2-rc04"
}
local = {
source = "hashicorp/local"
version = "~> 2.2"
}
technitium = {
source = "kenske/technitium"
version = "~> 0.2"
}
}
}
provider "technitium" {
host = var.technitium_host
# Fall back to a placeholder so the provider passes its credential check on
# the first run (before the token exists in Infisical). No technitium
# resources are created while the token is absent, so the dummy is never used.
token = coalesce(try(data.external.infisical.result["technitium_api_token"], ""), "token-not-yet-provisioned")
}
data "external" "infisical" {
program = ["bash", "-c", "infisical export --template=./secrets.tmpl"]
}
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
}