RulesetAccountEntrypoint
Source:
src/Cloudflare/Ruleset/AccountEntrypoint.ts
A Cloudflare Ruleset phase entrypoint for an account.
The account-level counterpart of Cloudflare.Ruleset: it owns the entire
ruleset for an account phase entrypoint (e.g. deploying custom WAF
rulesets across zones with execute rules, or configuring ddos_l4 /
magic_transit rules). The entrypoint is a per-phase singleton — destroy
empties its rules rather than deleting the phase.
Account-level phases require an Enterprise plan; on lower plans deploys
fail with the typed PhaseNotEntitled error.
Account WAF Deployment
Section titled “Account WAF Deployment”const ruleset = yield* Cloudflare.CustomRuleset("SharedWafRules", { phase: "http_request_firewall_custom", rules: [ { description: "Block exploit probes", expression: `lower(http.request.uri.path) contains "/.env"`, action: "block", }, ],});
yield* Cloudflare.RulesetAccountEntrypoint("WafDeployment", { phase: "http_request_firewall_custom", rules: [ { description: "Deploy shared WAF rules", expression: "true", action: "execute", actionParameters: { id: ruleset.rulesetId }, }, ],});