Public Terraform modules for Cloudflare infrastructure shared across SliceSoft projects.
This repository starts with one stable module:
| Module | Status | Purpose |
|---|---|---|
modules/pages |
Ready | Cloudflare Pages project with optional custom domain and optional DNS CNAME |
The repository is intentionally small in v0.x. New modules should only be added when there is real reuse and a stable contract.
Cloudflare infrastructure was already duplicated across multiple SliceSoft repositories. Instead of publishing one repo per resource, this repository groups small and composable Terraform modules by provider family.
That keeps release management simpler:
- one public repo
- one shared version per tag
- several focused modules under
modules/
module "docs" {
source = "git::https://github.com/slice-soft/ss-cloudflare-modules-iac.git//modules/pages?ref=v0.1.0"
account_id = var.cloudflare_account_id
project_name = "ss-keel-docs"
build_command = "npm run build"
destination_dir = "dist"
zone_id = var.cloudflare_zone_id
custom_domain = "docs.keel-go.dev"
}For module details, use:
Editorial documentation lives in docs/.
Terraform reference documentation lives inside each module README and is prepared for automatic updates through the release workflow, which delegates to the reusable tf-docs.yml workflow from ss-pipeline only after a release is created.
This repository is prepared to use reusable workflows from slice-soft/ss-pipeline:
- release automation with
.github/workflows/release.yml - Terraform README generation chained from
.github/workflows/release.yml
The tag flow is based on release-please and keeps the major tag such as v0 updated automatically.
The first module in this repo targets the Cloudflare Terraform provider v5 schema.
For imported Pages projects, the pages module intentionally ignores source and build_config updates because Cloudflare provider v5 can emit non-actionable drift and fail PATCH requests for those fields.
ss-cloudflare-modules-iac/
├── .github/workflows/
├── docs/
├── examples/
│ ├── pages-basic/
│ └── pages-custom-domain/
├── modules/
│ └── pages/
├── CHANGELOG.md
├── release-please-config.json
├── .release-please-manifest.json
├── README.md
└── LICENSE
modules/d1-databasemodules/r2-bucketmodules/dns-recordmodules/cache-ruleset
There is no generic cdn module for now. In Cloudflare that concept is too broad and would produce a weak API full of optional flags.
MIT