Files
homelab-v/tofu/kubernetes/providers.tf
T
Vegard Hagen 67f160fea1 fix(tofu): volume-provisioning
A Proxmox update probably broke/changed the way API requests are handled, giving errors on UPDATE calls with parameters that aren't used

Error: unexpected response code '400': {"data":null,"errors":{"format":"property is not defined in schema and the schema does not allow additional properties","vmid":"property is not defined in schema and the schema does not allow additional properties","size":"property is not defined in schema and the schema does not allow additional properties","filename":"property is not defined in schema and the schema does not allow additional properties"}}

Also update Mastercard/restapi provider
2025-04-17 18:24:03 +02:00

50 lines
1.2 KiB
Terraform

terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.36.0"
}
proxmox = {
source = "bpg/proxmox"
version = "0.74.0"
}
talos = {
source = "siderolabs/talos"
version = "0.7.1"
}
restapi = {
source = "Mastercard/restapi"
version = "2.0.1"
}
}
}
provider "proxmox" {
endpoint = var.proxmox.endpoint
insecure = var.proxmox.insecure
api_token = var.proxmox_api_token
ssh {
agent = true
username = var.proxmox.username
}
}
provider "restapi" {
uri = var.proxmox.endpoint
insecure = var.proxmox.insecure
write_returns_object = true
headers = {
"Content-Type" = "application/json"
"Authorization" = "PVEAPIToken=${var.proxmox_api_token}"
}
}
provider "kubernetes" {
host = module.talos.kube_config.kubernetes_client_configuration.host
client_certificate = base64decode(module.talos.kube_config.kubernetes_client_configuration.client_certificate)
client_key = base64decode(module.talos.kube_config.kubernetes_client_configuration.client_key)
cluster_ca_certificate = base64decode(module.talos.kube_config.kubernetes_client_configuration.ca_certificate)
}