terraform-cloudflare-docs-sites¶
Terraform configuration that provisions and deploys docs.vslice.net — a consolidated Cloudflare Pages documentation hub with Zero Trust access protection.
What it does¶
- Single Pages project — hub landing page with all repo docs served as
subdirectories (for example,
docs.vslice.net/agent-hub/) - Zero Trust protection — Cloudflare Access email allowlist
- Scoped deploy token — scoped to Cloudflare Pages Write
- Consolidated build —
scripts/build-all-docs.shassembles all repo docs into one deployable artifact
Key decisions¶
Build definition¶
The sites variable in variables.tf is the authoritative definition for the
repositories built into the docs hub.
Quick start¶
Just targets¶
| Target | Description |
|---|---|
just init |
Initialize Terraform |
just plan |
Plan infrastructure changes |
just apply |
Apply infrastructure changes |
just deploy-all |
Build and deploy all docs (hub+repos) |
just deploy-hub |
Deploy hub landing page only |
just ci-token |
Print the deploy API token |
just format |
Format all files |
just lint |
Lint all files |
just pre-commit |
Run pre-commit hooks on all files |
just terraform-docs |
Generate terraform-docs output |
just docs-serve |
Serve docs locally |
just docs-build |
Build docs |
just destroy |
Tear down all infrastructure |