openova/infra
hatiyildiz 330211d275 fix(tofu): drop redundant null_resource.dns_pool — PDM owns DNS writes
Every tofu apply on a pool deployment was hitting:

  null_resource.dns_pool[0]: Provisioning with 'local-exec'...
  null_resource.dns_pool[0] (local-exec): (output suppressed due to sensitive value in config)
  Error: Invalid field in API request
  catalyst-dns: write DNS: add *.omantel record: dynadot api error: code=

Two separate code paths were both writing Dynadot records for the same
deployment:

  1. The OpenTofu module's null_resource.dns_pool — a local-exec that
     shells out to /usr/local/bin/catalyst-dns inside the catalyst-api
     container. The binary's request payload is rejected by Dynadot.
  2. catalyst-api's pool-domain-manager call — pdm.Commit() at
     handler/deployments.go:247 writes the canonical record set with the
     LB IP after tofu apply returns. This path works.

Per #168 PDM is the single owner of all pool-domain Dynadot writes.
The null_resource path is a pre-#168 artifact that should have been
removed when PDM took ownership; keeping it dual-wrote DNS records
(when it worked) and broke the entire provision flow (when it didn't).

Verified end-to-end against the live catalyst-api at
console.openova.io: tofu apply created 7 of 11 Hetzner resources
(network, firewall, subnet, LB, 2 LB services, ssh_key) before
failing at null_resource.dns_pool[0]. With this commit the DNS-write
step disappears from the plan, and PDM /commit handles record
creation after the LB IP is known.

The dynadot_key + dynadot_secret variables in variables.tf remain
declared (provisioner.go still passes them through tfvars.json) but
are no longer referenced by any resource. Removing them is a separate
sweep — left for a follow-up to keep this commit narrowly scoped to
the failure path.
2026-04-29 14:52:57 +02:00
..
hetzner fix(tofu): drop redundant null_resource.dns_pool — PDM owns DNS writes 2026-04-29 14:52:57 +02:00