Skip to main content

One post tagged with "docusaurus"

View All Tags

Codifying scotthavird.com in Terraform

· 5 min read
Scott Havird
Engineer at Georgia-Pacific · ex-WarnerMedia Innovation Lab (ContentAI) · decade shipping AI-powered platforms

Codifying scotthavird.com in Terraform​

For years this site lived in two places at once: the Docusaurus repo and a scattering of Cloudflare dashboard clicks. Pages project settings, custom domains, zone security toggles, and an email signup API that only existed in AWS — none of it was reviewable in a PR.

That drift is fine until it isn't. I hit the www redirect trap on my own domain. Preview builds failed because Node 18 was still configured in the dashboard while Docusaurus 3.9 requires Node 20. Each fix was another manual change with no audit trail.

So I codified the whole stack in iac/ and retired the GitHub Actions deploy workflow in favor of native Cloudflare Pages builds.

TL;DR

Moved scotthavird.com infrastructure into Terraform: Cloudflare Pages (build + env vars), zone security (SSL strict, HSTS preload), DNS for SES, and an AWS Lambda subscribe API wired into the Docusaurus build via SUBSCRIBE_API_URL. Dashboard-only config is now PR-reviewable.