Skip to main content

cfd_tunnel_configurations

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

Overview

Namecfd_tunnel_configurations
TypeResource
Idcloudflare.zero_trust.cfd_tunnel_configurations

Fields

The following fields are returned by SELECT queries:

Get configuration response

NameDatatypeDescription
account_idstringIdentifier. (example: 023e105f4ecef8ad9ca31a8372d0c353)
tunnel_idstring (uuid)UUID of the tunnel. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415)
configobjectThe tunnel configuration and ingress rules.
created_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
sourcestringIndicates 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)
versionintegerThe version of the Tunnel Configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_accountselectaccount_id, tunnel_idGets the configuration for a remotely-managed tunnel
update_by_accountreplaceaccount_id, tunnel_idAdds 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
tunnel_idstringThe Cloudflare Tunnel ID.

SELECT examples

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

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;