cloudflare/ruleset v0.2.0
Builds LIB-0030 (noisypigeon/library#147).
Workload kinds. cloudflare.bucket (R2), cloudflare.dnsRecord, cloudflare.ruleset and cloudflare.apexRedirect, all maps.
- They sign in with the spoke's Cloudflare token and keep their state in the workload's Scaleway state bucket.
cloudflare.zonefillszonefor every entry that doesn't set its own.- A record's
namedefaults to its key, and itscommenttoworkloads/<w>. - A bucket's
account_idcomes fromcloudflare.encas a sensitive variable, never a literal.
Zone ownership. A root zones.yaml gives each zone one owner: a workload, or terraform for hand-written leaves.
- A workload may act only on its own zones.
- root.hcl refuses a hand-written
terraform/cloudflare/<zone>/leaf in a zone a workload owns. - A
zones.yamlchange re-plans every workload leaf and every zone leaf. - A spoke without
zones.yamlis unchanged, as is every non-Cloudflare leaf: they render identically to v5.1.0.
Refused before planning:
- two rulesets in one zone and phase;
- a redirect-phase ruleset beside an
apexRedirect; - two
apexRedirects in one zone; - duplicate records (
MX,TXT,CAA,SRVandNSmay repeat with different content); - an
A,AAAAorCNAMEat@, or anything atwww, where anapexRedirectholds placeholders; account_idorzone_idwritten;- a zone not owned;
- an overlong R2 name.
cloudflare/ruleset v0.2.0. A zone input, looked up by apex as dns-record does. It's exactly one of zone or zone_id.
workflows/:
resolve-workloads.shandgenerate-module-redirects.shgain the kinds, withworkload.schema.jsonforcloudflare/bucket(withoutaccount_id) andcloudflare/ruleset(withoutzone_id).terragrunt-run.ymlandterragrunt-detect.ymltreatzones.yamllikeroot.hcl.
A spoke can declare Cloudflare kinds once garden builds with this workflows/ release.
🤖 Generated with Claude Code
PR: https://github.com/noisypigeon/library/pull/152