krustyplanet.org/terraform/variables.tf
Jezza Hehn 8306229dc1 Add lock file, example tfvars, fix .gitignore
- Track .terraform.lock.hcl for reproducible provider versions
- Add terraform.tfvars.example as a template for sensitive values
- Fix .gitignore to not exclude lock file
- Add default value for ssh_public_key variable
2026-04-13 22:22:25 +00:00

70 lines
2 KiB
HCL

###############################################################################
# variables.tf
###############################################################################
variable "hcloud_token" {
description = "Hetzner Cloud API token (read/write). Set via TF_VAR_hcloud_token or terraform.tfvars."
type = string
sensitive = true
}
variable "project_name" {
description = "Short name used to prefix all resources."
type = string
default = "krustyplanet"
}
variable "domain" {
description = "Domain for the website."
type = string
default = "krustyplanet.org"
}
variable "ssh_public_key" {
description = "Your SSH public key (contents of ~/.ssh/id_ed25519.pub or similar)."
type = string
default = ""
}
variable "ssh_allowed_ips" {
description = "CIDRs allowed to reach port 22. Restrict to your actual IP for security."
type = list(string)
default = ["0.0.0.0/0", "::/0"] # Tighten this in production!
}
variable "server_type" {
description = "Hetzner server type."
type = string
default = "cx22"
# cx22 — 2 vCPU / 4 GB RAM — recommended for personal websites
# cax11 — 2 ARM vCPU / 4 GB — cheapest option (~€3.79/mo post-2026 pricing)
# cx32 — 4 vCPU / 8 GB — comfortable for a small team
}
variable "location" {
description = "Hetzner datacenter location."
type = string
default = "hel1" # Helsinki, FI — Finnish jurisdiction, strong privacy
# nbg1 — Nuremberg, DE
# fsn1 — Falkenstein, DE
# ash — Ashburn, US
}
variable "network_zone" {
description = "Hetzner network zone matching your location."
type = string
default = "eu-central"
# us-east or us-west for US locations
}
variable "node_version" {
description = "Node.js version to install."
type = string
default = "20"
}
variable "volume_size_gb" {
description = "Size of the persistent data volume in GB."
type = number
default = 40
}