My Blog
I host my blog on cloudflare and manage my infra with
terraform. I got a 522 when I went to https://www.pype.dev
recently and I
wondered why since https://pype.dev
worked fine...
Terraform
I had this right in the terraform:
resource "cloudflare_pages_domain" "cf_domain" { account_id = local.account_id project_name = cloudflare_pages_project.build_config.name domain = "pype.dev" }
But turns out the www
record was commented out for some reason in my terraform code:
resource "cloudflare_pages_domain" "cf_domain_www" { account_id = local.account_id project_name = cloudflare_pages_project.build_config.name domain = "www.pype.dev" }
A quick terraform apply -auto-approve
(careful with this) and we're up and
running with the www
record now