warp
Creates, updates, deletes, gets or lists a warp resource.
Overview
| Name | warp |
| Type | Resource |
| Id | cloudflare.zero_trust.warp |
Fields
The following fields are returned by SELECT queries:
- get
Get subnet response
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The UUID of the subnet. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415) |
name | string | A user-friendly name for the subnet. (example: IPv4 Cloudflare Source IPs) |
comment | string | An optional description of the subnet. (default: , example: example comment, x-stainless-terraform-configurability: computed_optional) |
created_at | string (date-time) | Timestamp of when the resource was created. (example: 2021-01-25T18:22:34.317854Z) |
deleted_at | string (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_network | boolean | If true, this is the default subnet for the account. There can only be one default subnet per account. (x-stainless-terraform-configurability: computed_optional) |
network | string | The private IPv4 or IPv6 range defining the subnet, in CIDR notation. (example: 100.64.0.0/12) |
subnet_type | string | The type of subnet. (cloudflare_source, warp) (example: cloudflare_source) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, subnet_id | Get a WARP IP assignment subnet. | |
create | insert | account_id, name, network | 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) | |
edit | update | account_id, subnet_id | 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 | |
delete | delete | account_id, subnet_id | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
subnet_id | string (uuid) |
SELECT examples
- get
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: warp
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the warp resource.
- name: comment
value: "{{ comment }}"
description: |
An optional description of the subnet.
default:
- name: is_default_network
value: {{ is_default_network }}
description: |
If `true`, this is the default subnet for the account. There can only be one default subnet per account.
default: false
- name: name
value: "{{ name }}"
description: |
A user-friendly name for the subnet.
- name: network
value: "{{ network }}"
description: |
The private IPv4 or IPv6 range defining the subnet, in CIDR notation.
UPDATE examples
- edit
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
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
;