Skip to content

Point apex DNS at Render landing site - #634

Merged
thomasluizon merged 1 commit into
mainfrom
fix/ticket-824-apex-cname
Sep 28, 2026
Merged

thomasluizon merged 1 commit into
mainfrom
fix/ticket-824-apex-cname

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Closes thomasluizon/orbit-tickets#824

Change

The apex record in infra/cloudflare.tf is now an unproxied CNAME to dns_apex_target. A Terraform moved block carries the existing apex_a state entry to apex_cname, so the type change is one planned replacement. infra/variables.tf defaults the target to orbit-landing-aaa7.onrender.com and validates it as a hostname. No other DNS record definitions changed.

infra/check-dns-cutover.sh verifies the flattened apex A answers against Render's target, checks the existing Render CNAMEs for app and www, and compares the remaining records with Spaceship. infra/README.md records the cutover domain values and verification steps. This keeps the current email and verification records under the existing comparison.

Test evidence

  • terraform fmt -check -recursive infra, terraform -chdir=infra validate, bash -n infra/check-dns-cutover.sh, and git diff --check passed.
  • A targeted plan with -refresh=false and placeholder provider tokens showed only cloudflare_dns_record.existing["apex_cname"] replacing the moved apex_a entry: 1 add, 0 change, 1 destroy. terraform -chdir=infra show -json local-apex.tfplan | node infra/check-web-plan.mjs passed.
  • The full offline plan showed unrelated pending changes, including creation of aws_sns_topic_subscription.ses_events_staging_api and updates to Render resources. A refreshed live plan could not complete because RENDER_API_KEY and CLOUDFLARE_API_TOKEN were unavailable in this shell. The apex-only acceptance criterion still needs a clean refreshed plan before apply.
  • Before apply, bash infra/check-dns-cutover.sh tom.ns.cloudflare.com failed only for the apex: Cloudflare returned 216.198.79.1 while the Render target returned 216.24.57.16 and 216.24.57.18.
  • node --test infra/check-web-plan.test.mjs infra/ses-isolation.test.mjs passed all 9 tests. dotnet build Orbit.slnx completed with 0 errors. dotnet test --no-build passed all 6,830 tests.
  • The DNS response shape used by the checker was observed with dig orbit-landing-aaa7.onrender.com A +noall +answer: two CNAME lines followed by IN A 216.24.57.18 and IN A 216.24.57.16 lines. dig @tom.ns.cloudflare.com app.useorbit.org CNAME +short returned orbit-web-3qmv.onrender.com. and the equivalent www query returned orbit-landing-aaa7.onrender.com.. Repeating those commands rechecks the parsed fields and trailing dot.

Assumptions

  • landing_custom_domains lists only useorbit.org because Render adds www.useorbit.org as a redirect automatically; listing www separately was rejected. See Render custom domains.
  • The cutover values for dns_app_target and dns_www_target follow the current authoritative Cloudflare answers; retaining the Vercel defaults as cutover values was rejected.
  • A Terraform moved block preserves the managed record address across the key rename; a manual state move was rejected.

Manual steps

  • In the infra/local.tfvars file used for the cutover, set dns_apex_target = "orbit-landing-aaa7.onrender.com" and retain dns_app_target = "orbit-web-3qmv.onrender.com" and dns_www_target = "orbit-landing-aaa7.onrender.com". The intended domain values are landing_custom_domains = ["useorbit.org"] and web_custom_domains = ["app.useorbit.org"]; retain their already applied values for an apex-only plan. A refreshed Terraform plan with valid RENDER_API_KEY, CLOUDFLARE_API_TOKEN, and AWS credentials must show only the apex replacement and pass infra/check-web-plan.mjs before applying the saved plan.
  • In the Terraform CLI for infra, apply that reviewed saved plan. dig @tom.ns.cloudflare.com useorbit.org A +short and the corresponding query to candy.ns.cloudflare.com must return Render's flattened addresses, and bash infra/check-dns-cutover.sh <cloudflare-nameserver> must pass for each nameserver.
  • In the Render Dashboard, open orbit-landing > Settings > Custom Domains and verify useorbit.org. The domain and certificate status must show verified after the DNS change.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — Reviewed the apex DNS cutover, its Terraform state move, validation, verification script, and operator instructions.

  • Apex record: Replaces the unproxied A record with a flattened CNAME to the Render landing hostname while preserving the Terraform instance through a moved block.
  • Cutover checks: Compares the apex A answers with the Render target, verifies the app and www CNAMEs, and retains comparisons for mail and verification records.
  • Operator guidance: Documents the Render targets, required custom domains, plan review, and post-apply DNS and certificate checks.

Pullfrog  | View workflow run | Using GPT Sol | 𝕏

@sonarqubecloud

Copy link
Copy Markdown

@thomasluizon
thomasluizon merged commit 65d355f into main Sep 28, 2026
27 checks passed
@thomasluizon
thomasluizon deleted the fix/ticket-824-apex-cname branch September 28, 2026 05:15
thomasluizon added a commit that referenced this pull request Sep 28, 2026
…) (#635)

* Guard web service Terraform plans before apply (#631)

* Guard Terraform web service updates before apply

* Guard Terraform web service replacement and deletion

(cherry picked from commit 7a1e26a)

* Add manual API release workflow for production and staging (#632)

(cherry picked from commit 498015a)

* Add Amazon SES delivery and signed event handling (#628)

* Add SES identities, DNS, and delivery infrastructure

* Add SES sender and signed SNS event handling

* Classify SES webhook and clarify email contract

* Fix SES cutover controls and webhook verification

* Extract shared email composition for SES and Resend

* Isolate staging SES events and sender credentials

* Escape interpolated names in the SES isolation test patterns

CodeQL js/incomplete-hostname-regexp flagged the tuple values flowing into
new RegExp; every interpolated value is now escaped as a literal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f770b47)

* Keep staging awake and reseed its free database (#626)

* Add staging keepalive and database reseed lifecycle

* Document and strengthen staging seed command

* Keep Terraform plan details out of workflow logs

* Require successful health responses in staging workflows

* Parse Render creation time portably

* Isolate staging database state and gate reseed on deploy

* Read the staging database id from the main state before moving it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Correlate staging reseed deploy with live commit

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ee40ae9)

* fix: point apex DNS at Render landing site (#634)

(cherry picked from commit 65d355f)

* Move uploads to private S3 with stable read links (#625)

* Add configurable S3 upload signing

* Provision private S3 upload buckets and scoped credentials

* Expose storage provider cutover as Terraform variables

* Add stable read redirects for private S3 uploads

* Map public upload reads in agent catalog

* Fix upload read validation and S3 bucket safeguards

* Keep S3 upload reads available across provider rollback

* Bound anonymous upload reads per client IP

(cherry picked from commit 395239f)

* Fix Render database names in API connection strings (#633)

* fix: derive Render database names from connection URLs

* Generate the staging database name pattern with a match timeout

SonarCloud S6444 and SYSLIB1045 on the seed target check: the pattern is now
a GeneratedRegex with a one second timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0fd416f)

* Complete carried error copy and generated gating matrix

* Keep SES event notifications recoverable (#746)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant