cloudflare/api-token v0.1.0
Builds LIB-0033 (noisypigeon/library#155).
cloudflare/api-token v0.1.0 (new). One account-owned token (cloudflare_account_token).
- Policies name their permission groups (such as
"DNS Write"), resolved through the account's permission-groups list. - Each policy is scoped to
zonesby apex,all_zonesor theaccount, exactly one. - An unknown group, or one the signing-in token may not grant (
is_selectable), fails the plan by name. rotation_daysreplaces the token create-before-destroy, asscaleway/terraform-deployer-iamdoes. Otherwise it expires afterexpires_on, or 365 days.- It outputs
idand a sensitivetoken.
terragrunt/root-hcl
secrets-schema.jsongainscloudflare_breakglass(CLOUDFLARE_BREAKGLASS_TOKEN) andbackblaze_breakglass. They're for hand-made keys that can only mint keys, read only by the leavesspoke.hcl'sbreakglass.leavesallowlists (LIB-0014 §2).- A workload that owns a zone in
zones.yaml, or declares acloudflare.bucket, getsworkloads/<w>/cloudflare/api-token/deployer, minted with the spoke's token. By default it has Zone Read, DNS Write and Dynamic URL Redirects Write on exactly its zones, plus Workers R2 Storage Write if it has buckets, and rotates every 30 days.cloudflare.deployeroverrides any input. - The four Cloudflare kinds now sign in with that token:
provider "cloudflare"readsvar.cloudflare_api_token. - Every other leaf renders identically to v5.2.0, Scaleway workload credentials included.
workflows/
resolve-workloads.shgenerates the token stub and wires Cloudflare stubs to it. Workload credentials are now per provider, so a Cloudflare leaf never gets Scaleway's variables.generate-module-redirects.shpublishes the token's schema, withoutaccount_id, and addscloudflare.deployertov1.json.
LIB-0033 gains an amendment:
- the token is keyed on zone ownership, so it exists before LIB-0032's import;
- the first
cloudflare.encholds the bootstrap token as a placeholder; - the API-token permission group names are confirmed only by the first real plan.
🤖 Generated with Claude Code
PR: https://github.com/noisypigeon/library/pull/159