Commit graph

12 commits

Author SHA1 Message Date
Jezza Hehn
8b0c095c50 slim terraform to match reality: server-only config
- Removed network, floating IP, volume, firewall, cloud-init (overkill for current setup)
- Matched config to actual server: cpx11, ash, krusty-clearnet
- Imported existing server (125941041) into Terraform state
- Applied labels (project=krustyplanet, role=web)
- Added outputs.tf for server_id, ipv4, location
- Added .gitignore for tfvars/state/secrets
2026-04-13 23:14:16 +00:00
Jezza Hehn
aa295f494c fix: CORS proxy config, cloud-init variable expansion, contact-api nginx snippet 2026-04-13 22:23:18 +00:00
Jezza Hehn
9f7aa97f4e Fix cloud-init: escape heredoc vars, add contact-api snippet, fix CORS
- Escape $uri/$host in heredocs so nginx sees them, not bash
- Rename heredoc markers (NGINXEOF, PROXYEOF, SVCEOF) to avoid conflicts
- Add contact-api nginx snippet WITHOUT proxy_set_header Origin (CORS fix)
- Fix contact-api clone URL to Forgejo
- Simplify .env template
2026-04-13 22:23:04 +00:00
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
Jezza Hehn
6707c59dd9 Replace all remaining references with 2026-04-13 22:17:25 +00:00
Jezza Hehn
220df89bf0 Fix DOMAIN variable name - DOMAIN -> domain 2026-04-13 22:17:11 +00:00
Jezza Hehn
e1633a041f Add domain variable to cloud-init and fix PROJECT_NAME references 2026-04-13 22:16:58 +00:00
Jezza Hehn
dd40b38b99 Fix cloud-init variable name - NODE_VERSION -> node_version 2026-04-13 22:16:37 +00:00
Jezza Hehn
dbdda6c9c4 Simplify cloud-init template - remove templatefile references 2026-04-13 22:16:22 +00:00
Jezza Hehn
c07d280927 Fix Terraform cycle error - remove firewall_ids from server 2026-04-13 22:14:55 +00:00
Jezza Hehn
73e842d581 Remove duplicate provider.tf - provider config is in main.tf 2026-04-13 22:14:25 +00:00
Jezza Hehn
b1fde182bf Add Terraform configuration for KrustyPlanet VPS
- Configure Hetzner Cloud server (CPX22, Ubuntu 24.04)
- Manage floating IP (87.99.133.81)
- Firewall rules for HTTP, HTTPS, SSH
- Persistent volume (40GB)
- nginx reverse proxy with SSL (Let's Encrypt)
- contact-api (Node.js email backend)
- Fix CORS issue: removed proxy_set_header Origin ://;
- Include cloud-init for initial provisioning

This Terraform config will manage the VPS going forward.
2026-04-13 22:14:11 +00:00