Skip to main content

warp

Creates, updates, deletes, gets or lists a warp resource.

Overview

Namewarp
TypeResource
Idcloudflare.zero_trust.warp

Fields

The following fields are returned by SELECT queries:

Get subnet response

NameDatatypeDescription
idstring (uuid)The UUID of the subnet. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415)
namestringA user-friendly name for the subnet. (example: IPv4 Cloudflare Source IPs)
commentstringAn optional description of the subnet. (default: , example: example comment, x-stainless-terraform-configurability: computed_optional)
created_atstring (date-time)Timestamp of when the resource was created. (example: 2021-01-25T18:22:34.317854Z)
deleted_atstring (date-time)Timestamp of when the resource was deleted. If null, the resource has not been deleted. (example: 2009-11-10T23:00:00.000000Z)
is_default_networkbooleanIf true, this is the default subnet for the account. There can only be one default subnet per account. (x-stainless-terraform-configurability: computed_optional)
networkstringThe private IPv4 or IPv6 range defining the subnet, in CIDR notation. (example: 100.64.0.0/12)
subnet_typestringThe type of subnet. (cloudflare_source, warp) (example: cloudflare_source)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, subnet_idGet a WARP IP assignment subnet.
createinsertaccount_id, name, networkCreate a WARP IP assignment subnet. Currently, only IPv4 subnets can be created. Network constraints: - The network must be within one of the following private IP ranges: - 10.0.0.0/8 (RFC 1918) - 172.16.0.0/12 (RFC 1918) - 192.168.0.0/16 (RFC 1918) - 100.64.0.0/10 (RFC 6598 - CGNAT) - The subnet must have a prefix length of /24 or larger (e.g., /16, /20, /24 are valid; /25, /28 are not)
editupdateaccount_id, subnet_idUpdates a WARP IP assignment subnet. Update constraints: - The network field cannot be modified for WARP subnets. Only name, comment, and is_default_network can be updated. - IPv6 subnets cannot be updated
deletedeleteaccount_id, subnet_idDelete a WARP IP assignment subnet. This operation is idempotent - deleting an already-deleted or non-existent subnet will return success with a null result.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
subnet_idstring (uuid)

SELECT examples

Get a WARP IP assignment subnet.

SELECT
id,
name,
comment,
created_at,
deleted_at,
is_default_network,
network,
subnet_type
FROM cloudflare.zero_trust.warp
WHERE account_id = '{{ account_id }}' -- required
AND subnet_id = '{{ subnet_id }}' -- required
;

INSERT examples

Create a WARP IP assignment subnet. Currently, only IPv4 subnets can be created. Network constraints: - The network must be within one of the following private IP ranges: - 10.0.0.0/8 (RFC 1918) - 172.16.0.0/12 (RFC 1918) - 192.168.0.0/16 (RFC 1918) - 100.64.0.0/10 (RFC 6598 - CGNAT) - The subnet must have a prefix length of /24 or larger (e.g., /16, /20, /24 are valid; /25, /28 are not)

INSERT INTO cloudflare.zero_trust.warp (
comment,
is_default_network,
name,
network,
account_id
)
SELECT
'{{ comment }}',
{{ is_default_network }},
'{{ name }}' /* required */,
'{{ network }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

UPDATE examples

Updates a WARP IP assignment subnet. Update constraints: - The network field cannot be modified for WARP subnets. Only name, comment, and is_default_network can be updated. - IPv6 subnets cannot be updated

UPDATE cloudflare.zero_trust.warp
SET
comment = '{{ comment }}',
is_default_network = {{ is_default_network }},
name = '{{ name }}',
network = '{{ network }}'
WHERE
account_id = '{{ account_id }}' --required
AND subnet_id = '{{ subnet_id }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete a WARP IP assignment subnet. This operation is idempotent - deleting an already-deleted or non-existent subnet will return success with a null result.

DELETE FROM cloudflare.zero_trust.warp
WHERE account_id = '{{ account_id }}' --required
AND subnet_id = '{{ subnet_id }}' --required
;