infra/terraform/main.tf
2026-01-11 11:27:34 -06:00

60 lines
1.3 KiB
HCL

terraform {
required_providers {
dnsimple = {
source = "dnsimple/dnsimple"
version = "~> 2.0"
}
porkbun = {
source = "kyswtn/porkbun"
version = "~> 0.1"
}
vultr = {
source = "vultr/vultr"
version = "~> 2.28"
}
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5.0"
}
null = {
source = "hashicorp/null"
version = "~> 3.0"
}
proxmox = {
source = "bpg/proxmox"
version = "~> 0.72"
}
}
}
terraform {
backend "http" {
# Backend credentials should be set via environment variables:
# TF_HTTP_ADDRESS, TF_HTTP_LOCK_ADDRESS, TF_HTTP_UNLOCK_ADDRESS
# TF_HTTP_USERNAME, TF_HTTP_PASSWORD
}
}
provider "dnsimple" {
token = var.dnsimple_token
account = var.dnsimple_account
}
provider "porkbun" {
api_key = var.porkbun_api_key
secret_api_key = var.porkbun_secret_api_key
}
provider "cloudflare" {
# API token is read from CLOUDFLARE_API_TOKEN environment variable
# No explicit api_token parameter needed - provider automatically reads the env var
}
provider "proxmox" {
endpoint = var.proxmox_home_api_url
api_token = "${var.proxmox_home_api_token}=${var.proxmox_home_api_secret}"
insecure = var.proxmox_home_tls_insecure
ssh {
agent = true
}
}