Cloudflare/dns
@swamp/cloudflare/dnsv2026.11.20.1
01README
Cloudflare dns infrastructure models
02Release Notes
- Updated: dns_records
03Behaviors
@swamp/cloudflare/dns/dns-firewallv2026.10.23.1dns_firewall.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| attack_mitigation? | object | Attack mitigation settings |
| deprecate_any_requests? | boolean | Whether to refuse to answer queries for the ANY type |
| ecs_fallback? | boolean | Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent |
| maximum_cache_ttl? | number | By default, Cloudflare attempts to cache responses for as long as\nindicated by the TTL received from upstream nameservers. This setting\nsets an upper bound on this duration. For caching purposes, higher TTLs\nwill be decreased to the maximum value defined by this setting.\n\nThis setting does not affect the TTL value in the DNS response\nCloudflare returns to clients. Cloudflare will always forward the TTL\nvalue received from upstream nameservers.\n |
| minimum_cache_ttl? | number | By default, Cloudflare attempts to cache responses for as long as\nindicated by the TTL received from upstream nameservers. This setting\nsets a lower bound on this duration. For caching purposes, lower TTLs\nwill be increased to the minimum value defined by this setting.\n\nThis setting does not affect the TTL value in the DNS response\nCloudflare returns to clients. Cloudflare will always forward the TTL\nvalue received from upstream nameservers.\n\nNote that, even with this setting, there is |
| name? | string | DNS Firewall cluster name |
| negative_cache_ttl? | number | This setting controls how long DNS Firewall should cache negative\nresponses (e.g., NXDOMAIN) from the upstream servers.\n\nThis setting does not affect the TTL value in the DNS response\nCloudflare returns to clients. Cloudflare will always forward the TTL\nvalue received from upstream nameservers.\n |
| ratelimit? | number | Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting. |
| retries? | number | Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt) |
| upstream_ips? | array | |
| dns_firewall_ip_count? | number | Number of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later. |
| 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 Dns Firewall
fn get(id: string)
Get a Dns Firewall
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Dns Firewall |
fn lookup(allowMissing?: boolean)
Look up an existing Dns Firewall by matching global argument values and import it into state
| Argument | Type | Description |
|---|---|---|
| allowMissing? | boolean | Succeed and record found: false in lookupResult when nothing matches, instead of failing |
fn adopt(id: string)
Import an existing Dns Firewall by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Dns Firewall to import |
fn update(identifier?: string)
Update Dns Firewall attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Dns Firewall by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Dns Firewall
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Dns Firewall |
fn sync(identifier?: string)
Sync Dns Firewall state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Dns Firewall by id (e.g. one discovered by list) |
Resources
state(infinite)— Dns Firewall resource state
lookupResult(infinite)— Outcome of the most recent lookup
@swamp/cloudflare/dns/dns-recordsv2026.11.20.1dns_records.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| comment? | string | Comments or notes about the DNS record. This field has no effect on DNS responses. |
| name? | string | Complete DNS record name, including the zone name, in Punycode. |
| proxied? | boolean | Whether the record is receiving the performance and security benefits of Cloudflare. |
| settings? | union | Settings for the DNS record. |
| tags? | array | Custom tags for the DNS record. This field has no effect on DNS responses. |
| ttl? | union | Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones. |
| content? | string | A valid IPv4 address. |
| private_routing? | boolean | Enables private network routing to the origin. |
| type? | enum | Record type. |
| priority? | number | Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map. |
| data? | union | Components of a CAA record. | Components of a CERT record. | Components of a DNSKEY record. | Components of a DS record. | Components of a HTTPS record. | Components of a SVCB record. | Components of a LOC record. | Components of a NAPTR record. | Components of a SMIMEA record. | Components of a TLSA record. | Components of a SRV record. | Components of a SSHFP record. | Components of a URI record. |
| 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 Dns Records
fn get(id: string)
Get a Dns Records
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Dns Records |
fn lookup(allowMissing?: boolean)
Look up an existing Dns Records by matching global argument values and import it into state
| Argument | Type | Description |
|---|---|---|
| allowMissing? | boolean | Succeed and record found: false in lookupResult when nothing matches, instead of failing |
fn adopt(id: string)
Import an existing Dns Records by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Dns Records to import |
fn update(identifier?: string)
Update Dns Records attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Dns Records by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Dns Records
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Dns Records |
fn sync(identifier?: string)
Sync Dns Records state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Dns Records by id (e.g. one discovered by list) |
Resources
state(infinite)— Dns Records resource state
lookupResult(infinite)— Outcome of the most recent lookup
@swamp/cloudflare/dns/nameserver-setsv2026.11.05.1nameserver_sets.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name? | string | Customer-defined name, unique within the account by exact string equality (case-sensitive, with no Unicode normalization). Must be valid UTF-8 and at most 255 UTF-8 bytes, not 255 characters. Only graphical Unicode characters are allowed; leading or trailing whitespace is rejected. The name can be changed without changing the set's nameservers or addresses. |
| advanced? | boolean | Whether to allocate the nameservers from distinct Advanced anycast groups. |
| ip_set? | number | Selects the account-specific IP set that supplies the nameserver addresses. Nameserver sets with the same `ip_set` and `advanced` value may reuse addresses; otherwise, they use disjoint address groups. |
| nameservers? | array | Lists each nameserver and the number of addresses to allocate to it. Requires a unique name for each entry in the set. |
| 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 Nameserver Sets
fn get(id: string)
Get a Nameserver Sets
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Nameserver Sets |
fn lookup(allowMissing?: boolean)
Look up an existing Nameserver Sets by matching global argument values and import it into state
| Argument | Type | Description |
|---|---|---|
| allowMissing? | boolean | Succeed and record found: false in lookupResult when nothing matches, instead of failing |
fn adopt(id: string)
Import an existing Nameserver Sets by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Nameserver Sets to import |
fn update(identifier?: string)
Update Nameserver Sets attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Nameserver Sets by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Nameserver Sets
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Nameserver Sets |
fn sync(identifier?: string)
Sync Nameserver Sets state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Nameserver Sets by id (e.g. one discovered by list) |
Resources
state(infinite)— Nameserver Sets resource state
lookupResult(infinite)— Outcome of the most recent lookup
@swamp/cloudflare/dns/viewsv2026.10.23.1views.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| created_time? | string | When the view was created. |
| modified_time? | string | When the view was last modified. |
| name? | string | The name of the view. |
| zones? | array | The list of zones linked to this view. |
| 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 Views
fn get(id: string)
Get a Views
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Views |
fn lookup(allowMissing?: boolean)
Look up an existing Views by matching global argument values and import it into state
| Argument | Type | Description |
|---|---|---|
| allowMissing? | boolean | Succeed and record found: false in lookupResult when nothing matches, instead of failing |
fn adopt(id: string)
Import an existing Views by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Views to import |
fn update(identifier?: string)
Update Views attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Views by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Views
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Views |
fn sync(identifier?: string)
Sync Views state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Views by id (e.g. one discovered by list) |
Resources
state(infinite)— Views resource state
lookupResult(infinite)— Outcome of the most recent lookup
04Previous Versions
2026.11.05.2AGPL-3.0-or-later
- Updated: dns_records
- Updated: nameserver_sets
2026.11.05.1AGPL-3.0-or-later
- Updated: dns_records
2026.10.28.1AGPL-3.0-or-later
- Updated: nameserver_sets
Modified 1 behaviors
2026.10.23.1AGPL-3.0-or-later
- Updated: dns_firewall
- Updated: dns_records
- Updated: nameserver_sets
- Updated: views
2026.10.20.1AGPL-3.0-or-later
- Updated: dns_firewall
- Updated: dns_records
- Updated: nameserver_sets
- Updated: views
Modified 4 behaviors
2026.10.17.1AGPL-3.0-or-later
- Updated: dns_records
2026.10.16.1AGPL-3.0-or-later(was none)
2026.10.13.1
- Updated: dns_firewall
- Updated: dns_records
- Updated: nameserver_sets
- Updated: views
2026.10.08.1
- Updated: nameserver_sets
2026.09.29.1
- Updated: nameserver_sets
Added 1 behaviors
2026.08.25.2
- Updated: dns_firewall
- Updated: dns_records
2026.08.25.1
- Updated: dns_firewall
- Updated: dns_records
2026.08.11.1
- Updated: dns_records
2026.07.24.1
- Updated: dns_records
2026.07.21.1
- Updated: dns_firewall
- Updated: dns_records
- Updated: views
2026.07.18.2
Modified 3 behaviors
2026.07.14.1
- Updated: dns_records
Added 3, removed 1 behaviors
2026.06.08.2
- Updated: dns_firewall
- Updated: dns_records
- Updated: views
2026.05.29.1
- Updated: dns_firewall
- Updated: dns_records
- Updated: views
05Stats
A
100 / 100
Downloads
654
Archive size
25.2 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
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned
06Platforms
07Labels