Repository navigation
Not planned
Not planned
Copy link
Labels
prunedClosed in the 2026-11-26 board prune; not needed for the source-independent tool
Description
Backlog. Prerequisite for moving the sccache bucket to Cloudflare R2 (see the
follow-up ticket), but worth doing on its own terms: the Cloudflare zone is
currently a second, unmanaged source of truth for infrastructure this repo
otherwise declares entirely in Terraform.
Current state, which is further along than it looks
- §18.8 resolved the DNS plane to Cloudflare (2026-10-10):
dupezero.comis
registered at Cloudflare Registrar, which pins the apex to Cloudflare's
nameservers, so there is deliberately no Route 53 zone — a second zone
would be a second DNS authority for one domain. - The provider is already declared:
cloudflare/cloudflare ~> 5.0in
infra/terraform/envs/dev/versions.tf, withprovider "cloudflare" {}
readingCLOUDFLARE_API_TOKENfrom the environment. That is deliberate and
should be preserved — a Terraform variable would write the token into the
plan file and into state. infra/terraform/envs/dev/ses.tfalready writes the SES Easy-DKIM and
MAIL FROM records into the zone.er-platform's ingress pins
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false", because dev
hostnames resolve to an internal tailnet-reached ALB that Cloudflare's proxy
could never reach.
What is actually unmanaged
- The zone, the registrar record, the apex and the nameservers — all
hand-created. Nothing imports them. ses.tfhas never been applied. Its own comment says so:
terraform state listmatched noses/cloudflare/mailresources.- The opt-in hack is the symptom to fix, and it is the crux. Both SES
variables default tonullso the file contributes nothing when unset. The
reason is §14.2 / PR feat(infra): terraform plan on every PR, apply on main behind a reviewer gate #352: onceterraform planbecame a CI gate, a missing
CLOUDFLARE_API_TOKENmeant the provider could not authenticate, the whole
envs/devplan failed, and the 101 resources that do plan cleanly were never
checked. Making SES opt-in was the workaround. - external-dns's scoped token (Secrets Manager, §18.8) is specified but the
path is blocked on task 1.4 andingress.enabled: false. - The demo share tunnel — a public
trycloudflarelink, currently paused.
It is off-design and carries documented teardown steps. Either bring it under
Terraform or tear it down; leaving it is the worst of the three.
The thing to actually solve
How a Cloudflare credential reaches CI without granting write. This is what
blocks everything else, and it has a clean answer worth confirming: Cloudflare
API tokens are scopable, so
- a read-only zone-scoped token as a GitHub secret lets
terraform plan
authenticate on every PR, which removes the opt-in hack and puts the records
back under the gate; - a write token, available only to the apply path on
main, does the
mutating half.
That split is the same shape as er-ci-sccache-read / er-ci-sccache-write,
and the same shape the R2 follow-up needs for cache-poisoning protection.
Scope
- Decide and document the token story above; put the read-only token in
place and confirmenvs/devplans end-to-end in CI with SES enabled - Remove the
ses.tfopt-in defaults once a plan no longer needs them -
terraform importthe zone and the existing records;planmust come back
empty afterwards, which is the only real proof the import was faithful - Decide the Terraform home: a
cloudflaremodule plus acore-level
stack, since the zone is account-wide rather than per-environment, and
envs/devis the wrong owner for an apex - Resolve the demo tunnel: import or tear down
- Apply
ses.tffor real, and confirm the DKIM records resolve
Watch out for
cloudflare_recordwas v4; v5 renamed itcloudflare_dns_record, and
versions.tfalready notes this.- Importing a zone you do not fully enumerate first produces a destructive plan.
Enumerate every record before writing any HCL. infra.yml's destroy guard and the house rule that no agent session applies
Terraform both still hold here.
Metadata
Metadata
Assignees
Labels
prunedClosed in the 2026-11-26 board prune; not needed for the source-independent tool
Activity
infra(core): declare the R2 sccache bucket and its lifecycle rule
infra(ci): give the core apply leg the Cloudflare credential and acco…
infra(core): declare the R2 sccache bucket and its lifecycle rule (#910…
athvin commentedon Nov 27, 2026
Closed in the 2026-11-26 board prune. The board now targets a deduplication tool that works the same whatever the data's source. This card is speculative or process upkeep, so it isn't needed for that. It's labelled
prunedand can be reopened if it becomes relevant.