diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 433d8e3a..b1663b8c 100755 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -168,6 +168,12 @@ kubectl get pods -A - `terraform apply -target=module.docker-registry-vm` - Apply docker registry VM - Only skip `-target` when explicitly told to apply everything +**IMPORTANT: When deploying a new service**, you must ALSO apply the `cloudflared` module to create the Cloudflare DNS record: +```bash +terraform apply -target=module.kubernetes_cluster.module.cloudflared -var="kube_config_path=$(pwd)/config" -auto-approve +``` +Adding a name to `cloudflare_non_proxied_names` or `cloudflare_proxied_names` in `terraform.tfvars` only defines the record — it won't be created until the `cloudflared` module is applied. + ## Module Structure Top-level modules in `main.tf`: - `module.k8s-node-template` - K8s node VM template diff --git a/.claude/skills/setup-project.md b/.claude/skills/setup-project.md index ab060e97..1698f606 100644 --- a/.claude/skills/setup-project.md +++ b/.claude/skills/setup-project.md @@ -313,9 +313,15 @@ smtp_password = var.mailserver_accounts["info@viktorbarzin.me"] ```bash terraform init -terraform apply -target=module.kubernetes_cluster.module. -auto-approve +terraform apply -target=module.kubernetes_cluster.module. -var="kube_config_path=$(pwd)/config" -auto-approve ``` +**IMPORTANT: Also apply the cloudflared module to create the Cloudflare DNS record:** +```bash +terraform apply -target=module.kubernetes_cluster.module.cloudflared -var="kube_config_path=$(pwd)/config" -auto-approve +``` +Without this step, the DNS record won't be created even though it's defined in `terraform.tfvars`. + ### 8. Verification ```bash