Skip to main content

Cloudflare/magic

@swamp/cloudflare/magicv2026.05.22.1· 1d agoMODELS
01README

Cloudflare magic infrastructure models

02Release Notes
  • Added: rules
  • Added: allowlist
  • Added: prefixes
  • Added: filters
  • Added: rules_syn_protection
  • Added: filters_tcp_flow_protection
  • Added: rules_tcp_flow_protection
  • Added: catalog-syncs
  • Added: onramps
  • Added: providers
  • Added: connectors
  • Added: gre_tunnels
  • Added: ipsec_tunnels
  • Added: redundancy_groups
  • Added: routes
  • Added: sites
03Models16
@swamp/cloudflare/magic/allowlistv2026.05.22.1allowlist.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
commentstringAn comment describing the allowlist prefix.
enabledbooleanWhether to enable the allowlist prefix into effect.
prefixstringThe allowlist prefix to add in CIDR format.
fn create()
Create a Allowlist
fn get(id: string)
Get a Allowlist
ArgumentTypeDescription
idstringThe ID of the Allowlist
fn update()
Update Allowlist attributes
fn delete(id: string)
Delete the Allowlist
ArgumentTypeDescription
idstringThe ID of the Allowlist
fn sync()
Sync Allowlist state from Cloudflare

Resources

state(infinite)— Allowlist resource state
@swamp/cloudflare/magic/catalog-syncsv2026.05.22.1catalog-syncs.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
description?string
namestring
policy?string
update_modeenum
destination_typeenum
fn create()
Create a Catalog-syncs
fn get(id: string)
Get a Catalog-syncs
ArgumentTypeDescription
idstringThe ID of the Catalog-syncs
fn update()
Update Catalog-syncs attributes
fn delete(id: string)
Delete the Catalog-syncs
ArgumentTypeDescription
idstringThe ID of the Catalog-syncs
fn sync()
Sync Catalog-syncs state from Cloudflare

Resources

state(infinite)— Catalog-syncs resource state
@swamp/cloudflare/magic/connectorsv2026.05.22.1connectors.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
activated?boolean
interrupt_window_days_of_week?arrayAllowed days of the week for upgrades. Default is all days.
interrupt_window_duration_hours?number
interrupt_window_embargo_dates?arrayList of dates (YYYY-MM-DD) when upgrades are blocked.
interrupt_window_hour_of_day?number
notes?string
timezone?string
provision_license?booleanWhen true, regenerate license key for the connector.
deviceobjectExactly one of id, serial_number, or provision_license must be provided.
fn create()
Create a Connectors
fn get(id: string)
Get a Connectors
ArgumentTypeDescription
idstringThe ID of the Connectors
fn update()
Update Connectors attributes
fn delete(id: string)
Delete the Connectors
ArgumentTypeDescription
idstringThe ID of the Connectors
fn sync()
Sync Connectors state from Cloudflare

Resources

state(infinite)— Connectors resource state
@swamp/cloudflare/magic/filtersv2026.05.22.1filters.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
expressionstringThe filter expression.
modestringThe filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
fn create()
Create a Filters
fn get(id: string)
Get a Filters
ArgumentTypeDescription
idstringThe ID of the Filters
fn update()
Update Filters attributes
fn delete(id: string)
Delete the Filters
ArgumentTypeDescription
idstringThe ID of the Filters
fn sync()
Sync Filters state from Cloudflare

Resources

state(infinite)— Filters resource state
@swamp/cloudflare/magic/filters-tcp_flow_protectionv2026.05.22.1filters_tcp_flow_protection.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
expressionstringThe filter expression.
modestringThe filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
fn create()
Create a Filters
fn get(id: string)
Get a Filters
ArgumentTypeDescription
idstringThe ID of the Filters
fn update()
Update Filters attributes
fn delete(id: string)
Delete the Filters
ArgumentTypeDescription
idstringThe ID of the Filters
fn sync()
Sync Filters state from Cloudflare

Resources

state(infinite)— Filters resource state
@swamp/cloudflare/magic/gre-tunnelsv2026.05.22.1gre_tunnels.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
automatic_return_routing?booleanTrue if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected.
cloudflare_gre_endpointstringThe IP address assigned to the Cloudflare side of the GRE tunnel.
customer_gre_endpointstringThe IP address assigned to the customer side of the GRE tunnel.
description?stringAn optional description of the GRE tunnel.
health_check?object
interface_addressstringA 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
interface_address6?stringA 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
mtu?numberMaximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
namestringThe name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
ttl?numberTime To Live (TTL) in number of hops of the GRE tunnel.
bgp?object
fn create()
Create a Gre Tunnels
fn get(id: string)
Get a Gre Tunnels
ArgumentTypeDescription
idstringThe ID of the Gre Tunnels
fn update()
Update Gre Tunnels attributes
fn delete(id: string)
Delete the Gre Tunnels
ArgumentTypeDescription
idstringThe ID of the Gre Tunnels
fn sync()
Sync Gre Tunnels state from Cloudflare

Resources

state(infinite)— Gre Tunnels resource state
@swamp/cloudflare/magic/ipsec-tunnelsv2026.05.22.1ipsec_tunnels.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
automatic_return_routing?booleanTrue if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected.
bgp?object
cloudflare_endpointstringThe IP address assigned to the Cloudflare side of the IPsec tunnel.
custom_remote_identities?object
customer_endpoint?stringThe IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
description?stringAn optional description forthe IPsec tunnel.
health_check?object
interface_addressstringA 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
interface_address6?stringA 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
namestringThe name of the IPsec tunnel. The name cannot share a name with other tunnels.
psk?stringA randomly generated or provided string for use in the IPsec tunnel.
replay_protection?booleanIf `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
fn create()
Create a Ipsec Tunnels
fn get(id: string)
Get a Ipsec Tunnels
ArgumentTypeDescription
idstringThe ID of the Ipsec Tunnels
fn update()
Update Ipsec Tunnels attributes
fn delete(id: string)
Delete the Ipsec Tunnels
ArgumentTypeDescription
idstringThe ID of the Ipsec Tunnels
fn sync()
Sync Ipsec Tunnels state from Cloudflare

Resources

state(infinite)— Ipsec Tunnels resource state
@swamp/cloudflare/magic/onrampsv2026.05.22.1onramps.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
attached_hubs?array
attached_vpcs?array
description?string
install_routes_in_cloudboolean
install_routes_in_magic_wanboolean
manage_hub_to_hub_attachments?boolean
manage_vpc_to_hub_attachments?boolean
namestring
vpc?string
adopted_hub_id?string
cloud_asn?numberSets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.
cloud_typeenum
dynamic_routingbooleanEnables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false.
hub_provider_id?string
region?string
typeenum
fn create()
Create a Onramps
fn get(id: string)
Get a Onramps
ArgumentTypeDescription
idstringThe ID of the Onramps
fn update()
Update Onramps attributes
fn delete(id: string)
Delete the Onramps
ArgumentTypeDescription
idstringThe ID of the Onramps
fn sync()
Sync Onramps state from Cloudflare

Resources

state(infinite)— Onramps resource state
@swamp/cloudflare/magic/prefixesv2026.05.22.1prefixes.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
commentstringA comment describing the prefix.
excludedbooleanWhether to exclude the prefix from protection.
prefixstringThe prefix to add in CIDR format.
fn create()
Create a Prefixes
fn get(id: string)
Get a Prefixes
ArgumentTypeDescription
idstringThe ID of the Prefixes
fn update()
Update Prefixes attributes
fn delete(id: string)
Delete the Prefixes
ArgumentTypeDescription
idstringThe ID of the Prefixes
fn sync()
Sync Prefixes state from Cloudflare

Resources

state(infinite)— Prefixes resource state
@swamp/cloudflare/magic/providersv2026.05.22.1providers.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
aws_arn?string
azure_subscription_id?string
azure_tenant_id?string
description?string
friendly_namestring
gcp_project_id?string
gcp_service_account_email?string
cloud_typeenum
fn create()
Create a Providers
fn get(id: string)
Get a Providers
ArgumentTypeDescription
idstringThe ID of the Providers
fn update()
Update Providers attributes
fn delete(id: string)
Delete the Providers
ArgumentTypeDescription
idstringThe ID of the Providers
fn sync()
Sync Providers state from Cloudflare

Resources

state(infinite)— Providers resource state
@swamp/cloudflare/magic/redundancy-groupsv2026.05.22.1redundancy_groups.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
description?stringOptional description
members?arrayTunnels to add to the group
namestringHuman-readable name for the redundancy group
fn create()
Create a Redundancy Groups
fn get(id: string)
Get a Redundancy Groups
ArgumentTypeDescription
idstringThe ID of the Redundancy Groups
fn update()
Update Redundancy Groups attributes
fn delete(id: string)
Delete the Redundancy Groups
ArgumentTypeDescription
idstringThe ID of the Redundancy Groups
fn sync()
Sync Redundancy Groups state from Cloudflare

Resources

state(infinite)— Redundancy Groups resource state
@swamp/cloudflare/magic/routesv2026.05.22.1routes.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
description?stringAn optional human provided description of the static route.
nexthopstringThe next-hop IP Address for the static route.
prefixstringIP Prefix in Classless Inter-Domain Routing format.
prioritynumberPriority of the static route.
scope?objectUsed only for ECMP routes.
weight?numberOptional weight of the ECMP scope - if provided.
fn create()
Create a Routes
fn get(id: string)
Get a Routes
ArgumentTypeDescription
idstringThe ID of the Routes
fn update()
Update Routes attributes
fn delete(id: string)
Delete the Routes
ArgumentTypeDescription
idstringThe ID of the Routes
fn sync()
Sync Routes state from Cloudflare

Resources

state(infinite)— Routes resource state
@swamp/cloudflare/magic/rulesv2026.05.22.1rules.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
burst_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
modestringThe mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
profile_sensitivitystringThe profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
namestringThe name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.
scopestringThe scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.
fn create()
Create a Rules
fn get(id: string)
Get a Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn sync()
Sync Rules state from Cloudflare

Resources

state(infinite)— Rules resource state
@swamp/cloudflare/magic/rules-syn_protectionv2026.05.22.1rules_syn_protection.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
burst_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
mitigation_type?stringThe type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.
modestringThe mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
namestringThe name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.
scopestringThe scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.
fn create()
Create a Rules
fn get(id: string)
Get a Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn sync()
Sync Rules state from Cloudflare

Resources

state(infinite)— Rules resource state
@swamp/cloudflare/magic/rules-tcp_flow_protectionv2026.05.22.1rules_tcp_flow_protection.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
burst_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
modestringThe mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
namestringThe name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.
scopestringThe scope for the TCP Flow Protection rule.
fn create()
Create a Rules
fn get(id: string)
Get a Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn sync()
Sync Rules state from Cloudflare

Resources

state(infinite)— Rules resource state
@swamp/cloudflare/magic/sitesv2026.05.22.1sites.ts

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
connector_id?stringMagic Connector identifier tag.
description?string
location?objectLocation of site in latitude and longitude.
namestringThe name of the site.
secondary_connector_id?stringMagic Connector identifier tag. Used when high availability mode is on.
ha_mode?booleanSite high availability mode. If set to true, the site can have two connectors and runs in high availability mode.
fn create()
Create a Sites
fn get(id: string)
Get a Sites
ArgumentTypeDescription
idstringThe ID of the Sites
fn update()
Update Sites attributes
fn delete(id: string)
Delete the Sites
ArgumentTypeDescription
idstringThe ID of the Sites
fn sync()
Sync Sites state from Cloudflare

Resources

state(infinite)— Sites resource state
04Stats
A
100 / 100
Downloads
0
Archive size
38.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 types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels