cfd_tunnel_configurations
Creates, updates, deletes, gets or lists a cfd_tunnel_configurations resource.
Overview
| Name | cfd_tunnel_configurations |
| Type | Resource |
| Id | cloudflare.zero_trust.cfd_tunnel_configurations |
Fields
The following fields are returned by SELECT queries:
- list_by_account
Get configuration response
| Name | Datatype | Description |
|---|---|---|
account_id | string | Identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
tunnel_id | string (uuid) | UUID of the tunnel. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415) |
config | object | The tunnel configuration and ingress rules. |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
source | string | Indicates if this is a locally or remotely configured tunnel. If local, manage the tunnel using a YAML file on the origin machine. If cloudflare, manage the tunnel's configuration on the Zero Trust dashboard. (local, cloudflare) (example: cloudflare, x-stainless-terraform-configurability: computed_optional) |
version | integer | The version of the Tunnel Configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_account | select | account_id, tunnel_id | Gets the configuration for a remotely-managed tunnel | |
update_by_account | replace | account_id, tunnel_id | Adds or updates the configuration for a remotely-managed 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. |
SELECT examples
- list_by_account
Gets the configuration for a remotely-managed tunnel
SELECT
account_id,
tunnel_id,
config,
created_at,
source,
version
FROM cloudflare.zero_trust.cfd_tunnel_configurations
WHERE account_id = '{{ account_id }}' -- required
AND tunnel_id = '{{ tunnel_id }}' -- required
;
REPLACE examples
- update_by_account
Adds or updates the configuration for a remotely-managed tunnel.
REPLACE cloudflare.zero_trust.cfd_tunnel_configurations
SET
config = '{{ config }}'
WHERE
account_id = '{{ account_id }}' --required
AND tunnel_id = '{{ tunnel_id }}' --required
RETURNING
errors,
messages,
result,
success;