Skip to main content

Cloudflare/gateway

@swamp/cloudflare/gatewayv2026.07.21.1· 1mo agoMODELS
01README

Cloudflare gateway infrastructure models

02Release Notes
  • Updated: certificates
  • Updated: lists
  • Updated: locations
  • Updated: pacfiles
  • Updated: proxy_endpoints
  • Updated: rules
03Models6
@swamp/cloudflare/gateway/certificatesv2026.07.21.1certificates.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
validity_period_days?numberSets the certificate validity period in days (range: 1-10,950 days / ~30 years). Defaults to 1,825 days (5 years). **Important**: This field is only settable during the certificate creation. Certificates becomes immutable after creation - use the `/activate` and `/deactivate` endpoints to manage certificate lifecycle.
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 Certificates
fn get(id: string)
Get a Certificates
ArgumentTypeDescription
idstringThe ID of the Certificates
fn lookup()
Look up an existing Certificates by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Certificates by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Certificates to import
fn delete(id: string)
Delete the Certificates
ArgumentTypeDescription
idstringThe ID of the Certificates
fn sync(identifier?: string)
Sync Certificates state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Certificates by id (e.g. one discovered by list)

Resources

state(infinite)— Certificates resource state
@swamp/cloudflare/gateway/listsv2026.07.21.1lists.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
append?arrayAdd items to the list.
remove?arrayLists of item values you want to remove.
description?stringProvide the list description.
items?arrayAdd items to the list.
namestringSpecify the list name.
typeenumSpecify the list type.
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 Lists
fn get(id: string)
Get a Lists
ArgumentTypeDescription
idstringThe ID of the Lists
fn lookup()
Look up an existing Lists by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Lists by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Lists to import
fn update(identifier?: string)
Update Lists attributes
ArgumentTypeDescription
identifier?stringTarget a specific Lists by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Lists
ArgumentTypeDescription
idstringThe ID of the Lists
fn sync(identifier?: string)
Sync Lists state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Lists by id (e.g. one discovered by list)

Resources

state(infinite)— Lists resource state
@swamp/cloudflare/gateway/locationsv2026.07.21.1locations.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
client_default?booleanIndicate whether this location is the default location.
dns_destination_ips_id?stringSpecify the identifier of the pair of IPv4 addresses assigned to this location. When creating a location, if this field is absent or set to null, the pair of shared IPv4 addresses (0e4a32c6-6fb8-4858-9296-98f51631e8e6) is auto-assigned. When updating a location, if this field is absent or set to null, the pre-assigned pair remains unchanged.
ecs_support?booleanIndicate whether the location must resolve EDNS queries.
endpoints?objectConfigure the destination endpoints for this location.
max_ttl?objectControls how DNS response TTLs are capped for this location relative to the account `max_ttl_secs` setting. Omitting `max_ttl` on update resets it to `inherit`.
namestringSpecify the location name.
networks?arraySpecify the list of network ranges from which requests at this location originate. The list takes effect only if it is non-empty and the IPv4 endpoint is enabled for this location.
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 Locations
fn get(id: string)
Get a Locations
ArgumentTypeDescription
idstringThe ID of the Locations
fn lookup()
Look up an existing Locations by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Locations by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Locations to import
fn update(identifier?: string)
Update Locations attributes
ArgumentTypeDescription
identifier?stringTarget a specific Locations by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Locations
ArgumentTypeDescription
idstringThe ID of the Locations
fn sync(identifier?: string)
Sync Locations state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Locations by id (e.g. one discovered by list)

Resources

state(infinite)— Locations resource state
@swamp/cloudflare/gateway/pacfilesv2026.07.21.1pacfiles.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
contentsstringActual contents of the PAC file
description?stringDetailed description of the PAC file.
namestringName of the PAC file.
slug?stringURL-friendly version of the PAC file name. If not provided, it will be auto-generated
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 Pacfiles
fn get(id: string)
Get a Pacfiles
ArgumentTypeDescription
idstringThe ID of the Pacfiles
fn lookup()
Look up an existing Pacfiles by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Pacfiles by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Pacfiles to import
fn update(identifier?: string)
Update Pacfiles attributes
ArgumentTypeDescription
identifier?stringTarget a specific Pacfiles by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Pacfiles
ArgumentTypeDescription
idstringThe ID of the Pacfiles
fn sync(identifier?: string)
Sync Pacfiles state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Pacfiles by id (e.g. one discovered by list)

Resources

state(infinite)— Pacfiles resource state
@swamp/cloudflare/gateway/proxy-endpointsv2026.07.21.1proxy_endpoints.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
ips?arraySpecify the list of CIDRs to restrict ingress connections.
name?stringSpecify the name of the proxy endpoint.
kind?enumThe proxy endpoint kind.
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 Proxy Endpoints
fn get(id: string)
Get a Proxy Endpoints
ArgumentTypeDescription
idstringThe ID of the Proxy Endpoints
fn lookup()
Look up an existing Proxy Endpoints by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Proxy Endpoints by ID into state for management
ArgumentTypeDescription
idstringThe ID of the Proxy Endpoints to import
fn update(identifier?: string)
Update Proxy Endpoints attributes
ArgumentTypeDescription
identifier?stringTarget a specific Proxy Endpoints by id (e.g. one discovered by list)
fn delete(id: string)
Delete the Proxy Endpoints
ArgumentTypeDescription
idstringThe ID of the Proxy Endpoints
fn sync(identifier?: string)
Sync Proxy Endpoints state from Cloudflare
ArgumentTypeDescription
identifier?stringTarget a specific Proxy Endpoints by id (e.g. one discovered by list)

Resources

state(infinite)— Proxy Endpoints resource state
@swamp/cloudflare/gateway/rulesv2026.07.21.1rules.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
description?stringSpecify the rule description.
enabled?booleanSpecify whether the rule is enabled.
namestringSpecify the rule name.
precedence?numberSet the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to [Order of enforcement](http://developers.cloudflare.com/learning-paths/secure-internet-traffic/understand-policies/order-of-enforcement/#manage-precedence-with-terraform) to manage precedence via Terraform.
actionenumSpecify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`.
device_posture?stringSpecify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
expiration?objectDefines the expiration time stamp and default duration of a DNS policy. Takes precedence over the policy's `schedule` configuration, if any. This does not apply to HTTP or network policies. Settable only for `dns` rules.
filters?arraySpecify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.
identity?stringSpecify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
rule_settings?objectDefines settings for this rule. Settings apply only to specific rule types and must use compatible selectors. If Terraform detects drift, confirm the setting supports your rule type and check whether the API modifies the value. Use API-returned values in your configuration to prevent drift.
schedule?objectDefines the schedule for activating DNS policies. Settable only for `dns` and `dns_resolver` rules.
traffic?stringSpecify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
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
04Previous Versions5
2026.07.18.2

Modified 6 models

2026.07.14.1
  • Updated: locations
  • Updated: rules

Added 6, removed 1 models

2026.06.08.2
  • Updated: certificates
  • Updated: lists
  • Updated: locations
  • Updated: pacfiles
  • Updated: proxy_endpoints
  • Updated: rules
2026.05.29.1
  • Updated: certificates
  • Updated: lists
  • Updated: locations
  • Updated: pacfiles
  • Updated: proxy_endpoints
  • Updated: rules
2026.05.22.1
  • Added: certificates
  • Added: lists
  • Added: locations
  • Added: pacfiles
  • Added: proxy_endpoints
  • Added: rules
05Stats
A
100 / 100
Downloads
4
Archive size
33.6 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