warp_connector
Creates, updates, deletes, gets or lists a warp_connector resource.
Overview
| Name | warp_connector |
| Type | Resource |
| Id | cloudflare.zero_trust.warp_connector |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get a Warp Connector Tunnel response
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | UUID of the tunnel. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415) |
name | string | A user-friendly name for a tunnel. (example: blog) |
account_tag | string | Cloudflare account ID (example: 699d98642c564d2e855e9661899b7252) |
connections | array | The Cloudflare Tunnel connections between your origin and Cloudflare's edge. (x-stainless-deprecation-message: This field will start returning an empty array. To fetch the connections of a given tunnel, please use the dedicated endpoint /accounts/{account_id}/{tunnel_type}/{tunnel_id}/connections) |
conns_active_at | string (date-time) | Timestamp of when the tunnel established at least one connection to Cloudflare's edge. If null, the tunnel is inactive. (example: 2009-11-10T23:00:00Z) |
conns_inactive_at | string (date-time) | Timestamp of when the tunnel became inactive (no connections to Cloudflare's edge). If null, the tunnel is active. (example: 2009-11-10T23:00:00Z) |
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) |
metadata | object | Metadata associated with the tunnel. |
status | string | The status of the tunnel. Valid values are inactive (tunnel has never been run), degraded (tunnel is active and able to serve traffic but in an unhealthy state), healthy (tunnel is active and able to serve traffic), or down (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). (inactive, degraded, healthy, down) (example: healthy) |
tun_type | string | The type of tunnel. (cfd_tunnel, warp_connector, warp, magic, ip_sec, gre, cni) (example: cfd_tunnel) |
List Warp Connector Tunnels response
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | UUID of the tunnel. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415) |
name | string | A user-friendly name for a tunnel. (example: blog) |
account_tag | string | Cloudflare account ID (example: 699d98642c564d2e855e9661899b7252) |
connections | array | The Cloudflare Tunnel connections between your origin and Cloudflare's edge. (x-stainless-deprecation-message: This field will start returning an empty array. To fetch the connections of a given tunnel, please use the dedicated endpoint /accounts/{account_id}/{tunnel_type}/{tunnel_id}/connections) |
conns_active_at | string (date-time) | Timestamp of when the tunnel established at least one connection to Cloudflare's edge. If null, the tunnel is inactive. (example: 2009-11-10T23:00:00Z) |
conns_inactive_at | string (date-time) | Timestamp of when the tunnel became inactive (no connections to Cloudflare's edge). If null, the tunnel is active. (example: 2009-11-10T23:00:00Z) |
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) |
metadata | object | Metadata associated with the tunnel. |
status | string | The status of the tunnel. Valid values are inactive (tunnel has never been run), degraded (tunnel is active and able to serve traffic but in an unhealthy state), healthy (tunnel is active and able to serve traffic), or down (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). (inactive, degraded, healthy, down) (example: healthy) |
tun_type | string | The type of tunnel. (cfd_tunnel, warp_connector, warp, magic, ip_sec, gre, cni) (example: cfd_tunnel) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, tunnel_id | Fetches a single Warp Connector Tunnel. | |
list | select | account_id | name, is_deleted, existed_at, uuid, was_active_at, was_inactive_at, include_prefix, exclude_prefix, status, per_page, page | Lists and filters Warp Connector Tunnels in an account. |
create | insert | account_id, name | Creates a new Warp Connector Tunnel in an account. | |
edit | update | account_id, tunnel_id | Updates an existing Warp Connector Tunnel. | |
delete | delete | account_id, tunnel_id | Deletes a Warp Connector Tunnel from an account. | |
update_failover | exec | account_id, tunnel_id, client_id | Triggers a manual failover for a specific WARP Connector Tunnel, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel. |
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. |
tunnel_id | string | The Cloudflare Tunnel ID. |
exclude_prefix | string | |
existed_at | string (url-encoded-date-time) | |
include_prefix | string | |
is_deleted | boolean | |
name | string | |
page | number | |
per_page | number | |
status | string | |
uuid | string (uuid) | |
was_active_at | string (date-time) | |
was_inactive_at | string (date-time) |
SELECT examples
- get
- list
Fetches a single Warp Connector Tunnel.
SELECT
id,
name,
account_tag,
connections,
conns_active_at,
conns_inactive_at,
created_at,
deleted_at,
metadata,
status,
tun_type
FROM cloudflare.zero_trust.warp_connector
WHERE account_id = '{{ account_id }}' -- required
AND tunnel_id = '{{ tunnel_id }}' -- required
;
Lists and filters Warp Connector Tunnels in an account.
SELECT
id,
name,
account_tag,
connections,
conns_active_at,
conns_inactive_at,
created_at,
deleted_at,
metadata,
status,
tun_type
FROM cloudflare.zero_trust.warp_connector
WHERE account_id = '{{ account_id }}' -- required
AND name = '{{ name }}'
AND is_deleted = '{{ is_deleted }}'
AND existed_at = '{{ existed_at }}'
AND uuid = '{{ uuid }}'
AND was_active_at = '{{ was_active_at }}'
AND was_inactive_at = '{{ was_inactive_at }}'
AND include_prefix = '{{ include_prefix }}'
AND exclude_prefix = '{{ exclude_prefix }}'
AND status = '{{ status }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- create
- Manifest
Creates a new Warp Connector Tunnel in an account.
INSERT INTO cloudflare.zero_trust.warp_connector (
ha,
name,
account_id
)
SELECT
{{ ha }},
'{{ name }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: warp_connector
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the warp_connector resource.
- name: ha
value: {{ ha }}
description: |
Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.
default: false
- name: name
value: "{{ name }}"
description: |
A user-friendly name for a tunnel.
UPDATE examples
- edit
Updates an existing Warp Connector Tunnel.
UPDATE cloudflare.zero_trust.warp_connector
SET
name = '{{ name }}',
tunnel_secret = '{{ tunnel_secret }}'
WHERE
account_id = '{{ account_id }}' --required
AND tunnel_id = '{{ tunnel_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Deletes a Warp Connector Tunnel from an account.
DELETE FROM cloudflare.zero_trust.warp_connector
WHERE account_id = '{{ account_id }}' --required
AND tunnel_id = '{{ tunnel_id }}' --required
;
Lifecycle Methods
- update_failover
Triggers a manual failover for a specific WARP Connector Tunnel, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.
EXEC cloudflare.zero_trust.warp_connector.update_failover
@account_id='{{ account_id }}' --required,
@tunnel_id='{{ tunnel_id }}' --required
@@json=
'{
"client_id": "{{ client_id }}"
}'
;