Skip to content

infra: Cloudflare custom domain for mostly-hallucinations.com#30

Merged
benpeter merged 1 commit intomainfrom
infra/cloudflare-custom-domain
Mar 14, 2026
Merged

infra: Cloudflare custom domain for mostly-hallucinations.com#30
benpeter merged 1 commit intomainfrom
infra/cloudflare-custom-domain

Conversation

@benpeter
Copy link
Owner

Summary

  • Adds Terraform (OpenTofu) config to manage Cloudflare zone for mostly-hallucinations.com as BYO CDN in front of AEM Edge Delivery Services
  • Deploys Adobe's aem-cloudflare-prod-worker with www → apex 301 redirect baked in
  • Configures DNS (apex + www CNAME, proxied), SSL (Full mode), TLS 1.2+ with 1.3 ZRT, HTTPS rewrites, and origin-respecting cache TTLs
  • Push invalidation registered with Adobe admin API

Infrastructure is already live and verified.

Test URLs

What's managed by Terraform

Resource Count
DNS records (apex + www CNAME) 2
Zone settings (SSL, TLS, cache, HTTPS) 6
Worker script + routes 3

What's NOT in Terraform

  • Zone creation (one-time dashboard action, then read via data source)
  • Nameserver delegation (dd24 registrar)
  • Push invalidation registration (Adobe admin API)
  • Redirect rule (handled in Worker instead of Cloudflare Ruleset — avoids permission gaps in scoped API tokens)

Test plan

  • curl -sI https://mostly-hallucinations.com/ returns 200 with cf-ray header
  • curl -sI https://www.mostly-hallucinations.com/ returns 301 to apex
  • Second request shows cf-cache-status: HIT
  • tofu plan shows no changes (state matches live infra)

🤖 Generated with Claude Code

Set up mostly-hallucinations.com on Cloudflare as BYO CDN for AEM Edge
Delivery Services. Terraform manages DNS (apex + www CNAME), zone settings
(SSL Full, TLS 1.2+, HTTPS rewrites), and the EDS Worker with push
invalidation. The Worker also handles www-to-apex 301 redirects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
@aem-code-sync
Copy link

aem-code-sync bot commented Mar 14, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@benpeter benpeter merged commit 6fcff50 into main Mar 14, 2026
2 of 3 checks passed
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.

2 participants