Cloudflare/gateway
@swamp/cloudflare/gatewayv2026.07.21.1
01README
Cloudflare gateway infrastructure models
02Release Notes
- Updated: certificates
- Updated: lists
- Updated: locations
- Updated: pacfiles
- Updated: proxy_endpoints
- Updated: rules
03Models
@swamp/cloudflare/gateway/certificatesv2026.07.21.1certificates.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| validity_period_days? | number | Sets 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? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare 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? | string | Cloudflare 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
| Argument | Type | Description |
|---|---|---|
| id | string | The 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
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Certificates to import |
fn delete(id: string)
Delete the Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Certificates |
fn sync(identifier?: string)
Sync Certificates state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| append? | array | Add items to the list. |
| remove? | array | Lists of item values you want to remove. |
| description? | string | Provide the list description. |
| items? | array | Add items to the list. |
| name | string | Specify the list name. |
| type | enum | Specify the list type. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare 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? | string | Cloudflare 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
| Argument | Type | Description |
|---|---|---|
| id | string | The 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
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Lists to import |
fn update(identifier?: string)
Update Lists attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Lists by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Lists
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Lists |
fn sync(identifier?: string)
Sync Lists state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| client_default? | boolean | Indicate whether this location is the default location. |
| dns_destination_ips_id? | string | Specify 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? | boolean | Indicate whether the location must resolve EDNS queries. |
| endpoints? | object | Configure the destination endpoints for this location. |
| max_ttl? | object | Controls 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`. |
| name | string | Specify the location name. |
| networks? | array | Specify 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? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare 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? | string | Cloudflare 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
| Argument | Type | Description |
|---|---|---|
| id | string | The 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
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Locations to import |
fn update(identifier?: string)
Update Locations attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Locations by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Locations
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Locations |
fn sync(identifier?: string)
Sync Locations state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| contents | string | Actual contents of the PAC file |
| description? | string | Detailed description of the PAC file. |
| name | string | Name of the PAC file. |
| slug? | string | URL-friendly version of the PAC file name. If not provided, it will be auto-generated |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare 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? | string | Cloudflare 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
| Argument | Type | Description |
|---|---|---|
| id | string | The 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
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Pacfiles to import |
fn update(identifier?: string)
Update Pacfiles attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Pacfiles by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Pacfiles
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Pacfiles |
fn sync(identifier?: string)
Sync Pacfiles state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| ips? | array | Specify the list of CIDRs to restrict ingress connections. |
| name? | string | Specify the name of the proxy endpoint. |
| kind? | enum | The proxy endpoint kind. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare 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? | string | Cloudflare 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
| Argument | Type | Description |
|---|---|---|
| id | string | The 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
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Proxy Endpoints to import |
fn update(identifier?: string)
Update Proxy Endpoints attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Proxy Endpoints by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Proxy Endpoints
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Proxy Endpoints |
fn sync(identifier?: string)
Sync Proxy Endpoints state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| description? | string | Specify the rule description. |
| enabled? | boolean | Specify whether the rule is enabled. |
| name | string | Specify the rule name. |
| precedence? | number | Set 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. |
| action | enum | Specify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to `true`. |
| device_posture? | string | Specify 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? | object | Defines 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? | array | Specify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value. |
| identity? | string | Specify 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? | object | Defines 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? | object | Defines the schedule for activating DNS policies. Settable only for `dns` and `dns_resolver` rules. |
| traffic? | string | Specify 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? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare 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? | string | Cloudflare 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
| Argument | Type | Description |
|---|---|---|
| id | string | The 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
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules to import |
fn update(identifier?: string)
Update Rules attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Rules by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn sync(identifier?: string)
Sync Rules state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Rules by id (e.g. one discovered by list) |
Resources
state(infinite)— Rules resource state
04Previous Versions
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