resource "hcloud_ssh_key" "cc_ci_orch" { name = "cc-ci-orchestrator-deploy" public_key = var.ssh_public_key labels = { project = "cc-ci-orchestrator" managed = "terraform" } } resource "hcloud_server" "cc_ci_orch" { name = var.server_name server_type = var.server_type image = var.image location = var.location ssh_keys = [hcloud_ssh_key.cc_ci_orch.id] # Stage 1: cloud-init runs nixos-infect on first boot, converting Debian to NixOS, then reboots. # Wait ~5 min after apply, then SSH in and run Stage 2 per README.md. user_data = file("${path.module}/user-data.sh") public_net { ipv4_enabled = true ipv6_enabled = false } labels = { project = "cc-ci-orchestrator" managed = "terraform" stage = "infect" } }