Infrastructure-as-code for managing DNS records across all hyperpolymath domains.
-
Manage unlimited domains from single CSV/Excel file
-
Consistent DNS structure across all domains
-
Version controlled changes
-
Preview before apply (see exactly what will change)
-
Bulk updates (change all domains at once)
-
Domain-specific customization (keys, tunnel IDs, etc.)
-
Optional Web3/IPFS gateway hostnames for direct
https://ipfs.<domain>/access -
Optional edge consent/capability prefilters when the origin already enforces the canonical policy
# Linux
wget https://releases.hashicorp.com/terraform/1.7.0/terraform_1.7.0_linux_amd64.zip
unzip terraform_1.7.0_linux_amd64.zip
sudo mv terraform /usr/local/bin/cp terraform.tfvars.example terraform.tfvarsterraform.tfvars:
cloudflare_api_token = "your-api-token-here"
cloudflare_account_id = "your-account-id-here"Edit domains.csv. Key columns:
| Column | Description | Example |
|---|---|---|
|
Domain name |
|
|
GitHub username |
|
|
GitHub repo name |
|
|
Cloudflare Tunnel ID |
|
|
Primary mail server |
|
|
Enable MX records |
|
|
Enable Cloudflare Tunnel |
|
|
Enable SSHFP records |
|
|
Enable GitHub Pages CNAME |
|
|
Enable Cloudflare Web3 IPFS hostname |
|
|
Initial DNSLink for Web3 hostname |
|
|
Cloudflare Pages project name |
|
www, static, assets, cdn, discourse, zulip, chat, conference, members, stfp, office, ci, status, logs, api, auth, wasm, linkedin, rss CNAMEs; SPF TXT; DMARC TXT; CAA records.
-
GitHub Pages:
gh-pagesCNAME (ifenable_github_pages=true) -
Cloudflare Pages: Custom domain setup (if
pages_projectset) -
Web3/IPFS:
ipfs.<domain>hostname (ifenable_ipfs_gateway=true) -
Mail: MX, MTA-STS, TLS-RPT (if
enable_mail=true) -
SSH: SSHFP records (if
enable_ssh=true) -
Tunnel:
*.internalCNAMEs (ifenable_tunnel=true)
# Add domains: edit domains.csv, then:
terraform apply
# Preview changes first:
terraform plan && terraform apply
# Remove a domain: delete row from CSV, then:
terraform applyterraform apply -target='cloudflare_record.www["wokelang.org"]'
terraform destroy -target='data.cloudflare_zones.all["example.com"]'-
main.tf— Terraform configuration (DNS resource definitions) -
variables.tf— Variable declarations -
domains.csv— Your data (edit this in Excel/LibreOffice) -
terraform.tfvars— Credentials (API token) — do not commit! -
terraform.tfstate— Terraform state (auto-generated, don’t edit)
Domain isn’t added to Cloudflare yet. Add it at: https://dash.cloudflare.com
API token needs: Zone:DNS:Edit, Account:Cloudflare Pages:Edit, Zone:Read, Web3 Hostnames Write (if using IPFS).
See TOPOLOGY.md for a visual architecture map and completion dashboard.
Wondering how this works? See EXPLAINME.adoc.
SPDX-License-Identifier: PMPL-1.0-or-later
See LICENSE.