Tunnel exposes applications running on your local web server on any network with an internet connection without manually adding DNS records or configuring a firewall or router.
resource "cloudflare_tunnel" "example" {
account_id = "f037e56e89293a057740de681ac9abbe"
name = "my-tunnel"
secret = "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg="
}
account_id
(String) The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.name
(String) A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.secret
(String, Sensitive) 32 or more bytes, encoded as a base64 string. The Create Argo Tunnel endpoint sets this as the tunnel's password. Anyone wishing to run the tunnel needs this password. Modifying this attribute will force creation of a new resource.config_src
(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 on the Zero Trust dashboard or using tunnel_config, tunnel_route or tunnel_virtual_network resources. Available values: local
, cloudflare
. Modifying this attribute will force creation of a new resource.cname
(String) Usable CNAME for accessing the Tunnel.id
(String) The ID of this resource.tunnel_token
(String, Sensitive) Token used by a connector to authenticate and run the tunnel.Import is supported using the following syntax:
$ terraform import cloudflare_tunnel.example <account_id>/<tunnel_id>