pez-infra/terraform
Rasmus "Pez" Wejlgaard 9de6d8faf9
Some checks are pending
Deploy (on merge) / Discover hosts (push) Waiting to run
Deploy (on merge) / deploy (push) Blocked by required conditions
Terraform / Plan (push) Waiting to run
Terraform / Apply (push) Blocked by required conditions
update plex exporter to home grown one (#148)
2026-08-31 18:45:57 +01:00
..
grafana update plex exporter to home grown one (#148) 2026-08-31 18:45:57 +01:00
hetzner decomm copenhagen-b and copenhagen-c (#144) 2026-07-28 10:54:23 +01:00
pagerduty chore(deps): bump the terraform group across 2 directories with 1 update (#116) 2026-06-05 21:12:59 +01:00
.gitignore initial commit 2026-03-28 12:39:41 +00:00
.terraform.lock.hcl Update caddy for unifi and copenhagen (#142) 2026-07-20 22:21:13 +01:00
main.tf adding pagerduty stack (#95) 2026-05-04 20:50:31 +01:00
Makefile initial commit 2026-03-28 12:39:41 +00:00
providers.tf chore(deps): bump the terraform group across 2 directories with 1 update (#116) 2026-06-05 21:12:59 +01:00
README.md Update README.md 2026-07-23 20:43:17 +02:00
secrets.enc.yaml adding pagerduty stack (#95) 2026-05-04 20:50:31 +01:00
vars.tf initial commit 2026-03-28 12:39:41 +00:00

Terraform

Infrastructure-as-code for cloud and edge services. Uses OpenTofu (drop-in Terraform replacement).

What's managed

  • Hetzner Cloud — Two servers (nuremberg-a, helsinki-a), firewalls, and DNS for pez.sh
  • Grafana Cloud — Stack, dashboards, synthetic monitoring checks, alert rules, Fleet collectors and pipelines
  • PagerDuty — Service, escalation policy, and Grafana integration

Secrets

Secrets are stored encrypted in secrets.enc.yaml via SOPS and decrypted at plan/apply time into secrets.yaml. The Makefile handles decryption automatically.

State

State is stored in a Backblaze B2 bucket (pez-infra-tfstate) using an S3-compatible backend. Credentials are read from AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY environment variables — the Makefile exports them from the backblaze_keyID / backblaze_applicationKey secrets automatically.

Usage

make init   # initialize providers and backend
make plan   # preview changes
make apply  # apply changes
make fmt    # format all .tf files

Provider versions

Provider Source Version
Hetzner Cloud hetznercloud/hcloud ~> 1.45
Grafana grafana/grafana ~> 4.35
PagerDuty pagerduty/pagerduty ~> 3.32
OpenTofu >= 1.6.0