Skip to main content

Cloudflare/firewall

@swamp/cloudflare/firewallv2026.07.24.1· 14d agoMODELS
01README

Cloudflare firewall infrastructure models

02Release Notes
  • Updated: rules
03Models5
@swamp/cloudflare/firewall/lockdownsv2026.07.21.1lockdowns.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
configurationsarrayA list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations.
urlsarrayThe URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
description?stringAn informative summary of the rule. This value is sanitized and any tags will be removed.
paused?booleanWhen true, indicates that the rule is currently paused.
priority?numberThe priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Lockdowns
fn get(id: string)
Get a Lockdowns
ArgumentTypeDescription
idstringThe ID of the Lockdowns
fn lookup()
Look up an existing Lockdowns by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Lockdowns by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Lockdowns to import
fn update(identifier?: string)
Update Lockdowns attributes
ArgumentTypeDescription
identifier?stringTarget a specific Lockdowns by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Lockdowns
ArgumentTypeDescription
idstringThe ID of the Lockdowns
fn sync(identifier?: string)
Sync Lockdowns state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Lockdowns by id (e.g. one discovered by list)

Resources

state(infinite)— Lockdowns resource state
@swamp/cloudflare/firewall/overridesv2026.07.21.1overrides.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
id?stringDefines an identifier.
rewrite_action?objectSpecifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.
rules?recordAn object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a `groups` object or a `rules` object.
urlsarrayThe URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Overrides
fn get(id: string)
Get a Overrides
ArgumentTypeDescription
idstringThe ID of the Overrides
fn lookup()
Look up an existing Overrides by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Overrides by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Overrides to import
fn update(identifier?: string)
Update Overrides attributes
ArgumentTypeDescription
identifier?stringTarget a specific Overrides by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Overrides
ArgumentTypeDescription
idstringThe ID of the Overrides
fn sync(identifier?: string)
Sync Overrides state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Overrides by id (e.g. one discovered by list)

Resources

state(infinite)— Overrides resource state
@swamp/cloudflare/firewall/rate-limitsv2026.07.21.1rate_limits.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
actionobject
matchobject
periodnumberThe time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.
thresholdnumberThe threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Rate Limits
fn get(id: string)
Get a Rate Limits
ArgumentTypeDescription
idstringThe ID of the Rate Limits
fn lookup()
Look up an existing Rate Limits by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Rate Limits by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Rate Limits to import
fn update(identifier?: string)
Update Rate Limits attributes
ArgumentTypeDescription
identifier?stringTarget a specific Rate Limits by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Rate Limits
ArgumentTypeDescription
idstringThe ID of the Rate Limits
fn sync(identifier?: string)
Sync Rate Limits state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Rate Limits by id (e.g. one discovered by list)

Resources

state(infinite)— Rate Limits resource state
@swamp/cloudflare/firewall/rulesv2026.07.24.1rules.ts

Global Arguments

ArgumentTypeDescription
account_id?stringCloudflare account ID (provide account_id or zone_id)
zone_id?stringCloudflare zone ID (provide account_id or zone_id)
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
allowed_modes?arrayThe available actions that a rule can apply to a matched request.
configurationobject
created_on?stringThe timestamp of when the rule was created.
id?stringThe unique identifier of the IP Access rule.
modeenumThe action to apply to a matched request.
modified_on?stringThe timestamp of when the rule was last modified.
notes?stringAn informative summary of the rule, typically used as a reminder or explanation.
scope?objectAll zones owned by the user will have the rule applied.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Rules
fn get(id: string)
Get a Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn lookup()
Look up an existing Rules by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Rules by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Rules to import
fn update(identifier?: string)
Update Rules attributes
ArgumentTypeDescription
identifier?stringTarget a specific Rules by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn sync(identifier?: string)
Sync Rules state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Rules by id (e.g. one discovered by list)

Resources

state(infinite)— Rules resource state
@swamp/cloudflare/firewall/ua-rulesv2026.07.21.1ua_rules.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
configurationobject
description?stringAn informative summary of the rule. This value is sanitized and any tags will be removed.
id?stringThe unique identifier of the resource.
modeenumThe action to apply to a matched request.
paused?booleanWhen true, indicates that the rule is currently paused.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Ua Rules
fn get(id: string)
Get a Ua Rules
ArgumentTypeDescription
idstringThe ID of the Ua Rules
fn lookup()
Look up an existing Ua Rules by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Ua Rules by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Ua Rules to import
fn update(identifier?: string)
Update Ua Rules attributes
ArgumentTypeDescription
identifier?stringTarget a specific Ua Rules by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Ua Rules
ArgumentTypeDescription
idstringThe ID of the Ua Rules
fn sync(identifier?: string)
Sync Ua Rules state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Ua Rules by id (e.g. one discovered by list)

Resources

state(infinite)— Ua Rules resource state
04Previous Versions5
2026.07.21.1
  • Updated: rules
  • Updated: lockdowns
  • Updated: ua_rules
  • Updated: overrides
  • Updated: rate_limits
2026.07.18.2

Added 5, removed 1 models

2026.06.08.2
  • Updated: rules
  • Updated: lockdowns
  • Updated: ua_rules
  • Updated: overrides
  • Updated: rate_limits
2026.05.29.1
  • Updated: rules
  • Updated: lockdowns
  • Updated: ua_rules
  • Updated: overrides
  • Updated: rate_limits
2026.05.22.1
  • Added: rules
  • Added: lockdowns
  • Added: ua_rules
  • Added: overrides
  • Added: rate_limits
05Stats
A
100 / 100
Downloads
0
Archive size
26.5 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels