Tunnel

class Tunnel : KotlinCustomResource

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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.Tunnel("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
name: "my-tunnel",
secret: "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=",
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.Tunnel("example",
account_id="f037e56e89293a057740de681ac9abbe",
name="my-tunnel",
secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = new Cloudflare.Tunnel("example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Name = "my-tunnel",
Secret = "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=",
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewTunnel(ctx, "example", &cloudflare.TunnelArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Name: pulumi.String("my-tunnel"),
Secret: pulumi.String("AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg="),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.Tunnel;
import com.pulumi.cloudflare.TunnelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Tunnel("example", TunnelArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("my-tunnel")
.secret("AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=")
.build());
}
}
resources:
example:
type: cloudflare:Tunnel
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: my-tunnel
secret: AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=

Import

$ pulumi import cloudflare:index/tunnel:Tunnel example <account_id>/<tunnel_id>

Properties

Link copied to clipboard
val accountId: Output<String>

The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val cname: Output<String>

Usable CNAME for accessing the Tunnel.

Link copied to clipboard
val configSrc: Output<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 tunnelconfig, tunnelroute or tunnelvirtualnetwork resources. Available values: local, cloudflare. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val secret: Output<String>

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.

Link copied to clipboard
val tunnelToken: Output<String>

Token used by a connector to authenticate and run the tunnel.

Link copied to clipboard
val urn: Output<String>