Files
gtar/opentofu/provider.tf
2025-10-02 19:57:57 +10:00

77 lines
1.3 KiB
HCL

terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = "3.0.2-rc04"
}
}
backend "pg" {
schema_name = "homelab-ghshr"
}
encryption {
key_provider "pbkdf2" "mykey" {
passphrase = var.passphrase
key_length = 32
salt_length = 16
hash_function = "sha256"
}
method "aes_gcm" "secure_method" {
keys = key_provider.pbkdf2.mykey
}
state {
method = method.aes_gcm.secure_method
enforced = true
}
}
}
variable "ci_user" {
type = string
sensitive = true
}
variable "ci_password" {
type = string
sensitive = true
}
variable "proxmox_api_url" {
type = string
sensitive = true
}
variable "proxmox_api_token_id" {
type = string
sensitive = true
}
variable "proxmox_api_token_secret" {
type = string
sensitive = true
}
variable "ssh_key" {
type = string
sensitive = true
}
variable "passphrase" {
type = string
sensitive = true
}
provider "proxmox" {
pm_api_url = var.proxmox_api_url
pm_user = "root@pam"
pm_password = var.proxmox_api_token_secret
pm_timeout = 3600
pm_parallel = 2 # Fix VM HDD lock timeout
# Optional: Skip TLS Verification
pm_tls_insecure = true
}