1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustTunnelCloudflared
Cloudflare v5.39.1 published on Tuesday, Sep 24, 2024 by Pulumi

cloudflare.ZeroTrustTunnelCloudflared

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.39.1 published on Tuesday, Sep 24, 2024 by Pulumi

    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.ZeroTrustTunnelCloudflared("example", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "my-tunnel",
        secret: "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.ZeroTrustTunnelCloudflared("example",
        account_id="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.NewZeroTrustTunnelCloudflared(ctx, "example", &cloudflare.ZeroTrustTunnelCloudflaredArgs{
    			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:      pulumi.String("my-tunnel"),
    			Secret:    pulumi.String("AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg="),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Cloudflare.ZeroTrustTunnelCloudflared("example", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "my-tunnel",
            Secret = "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ZeroTrustTunnelCloudflared;
    import com.pulumi.cloudflare.ZeroTrustTunnelCloudflaredArgs;
    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 ZeroTrustTunnelCloudflared("example", ZeroTrustTunnelCloudflaredArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("my-tunnel")
                .secret("AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:ZeroTrustTunnelCloudflared
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: my-tunnel
          secret: AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=
    

    Create ZeroTrustTunnelCloudflared Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ZeroTrustTunnelCloudflared(name: string, args: ZeroTrustTunnelCloudflaredArgs, opts?: CustomResourceOptions);
    @overload
    def ZeroTrustTunnelCloudflared(resource_name: str,
                                   args: ZeroTrustTunnelCloudflaredArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZeroTrustTunnelCloudflared(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   account_id: Optional[str] = None,
                                   name: Optional[str] = None,
                                   secret: Optional[str] = None,
                                   config_src: Optional[str] = None)
    func NewZeroTrustTunnelCloudflared(ctx *Context, name string, args ZeroTrustTunnelCloudflaredArgs, opts ...ResourceOption) (*ZeroTrustTunnelCloudflared, error)
    public ZeroTrustTunnelCloudflared(string name, ZeroTrustTunnelCloudflaredArgs args, CustomResourceOptions? opts = null)
    public ZeroTrustTunnelCloudflared(String name, ZeroTrustTunnelCloudflaredArgs args)
    public ZeroTrustTunnelCloudflared(String name, ZeroTrustTunnelCloudflaredArgs args, CustomResourceOptions options)
    
    type: cloudflare:ZeroTrustTunnelCloudflared
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ZeroTrustTunnelCloudflaredArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ZeroTrustTunnelCloudflaredArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ZeroTrustTunnelCloudflaredArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZeroTrustTunnelCloudflaredArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZeroTrustTunnelCloudflaredArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var zeroTrustTunnelCloudflaredResource = new Cloudflare.ZeroTrustTunnelCloudflared("zeroTrustTunnelCloudflaredResource", new()
    {
        AccountId = "string",
        Name = "string",
        Secret = "string",
        ConfigSrc = "string",
    });
    
    example, err := cloudflare.NewZeroTrustTunnelCloudflared(ctx, "zeroTrustTunnelCloudflaredResource", &cloudflare.ZeroTrustTunnelCloudflaredArgs{
    	AccountId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Secret:    pulumi.String("string"),
    	ConfigSrc: pulumi.String("string"),
    })
    
    var zeroTrustTunnelCloudflaredResource = new ZeroTrustTunnelCloudflared("zeroTrustTunnelCloudflaredResource", ZeroTrustTunnelCloudflaredArgs.builder()
        .accountId("string")
        .name("string")
        .secret("string")
        .configSrc("string")
        .build());
    
    zero_trust_tunnel_cloudflared_resource = cloudflare.ZeroTrustTunnelCloudflared("zeroTrustTunnelCloudflaredResource",
        account_id="string",
        name="string",
        secret="string",
        config_src="string")
    
    const zeroTrustTunnelCloudflaredResource = new cloudflare.ZeroTrustTunnelCloudflared("zeroTrustTunnelCloudflaredResource", {
        accountId: "string",
        name: "string",
        secret: "string",
        configSrc: "string",
    });
    
    type: cloudflare:ZeroTrustTunnelCloudflared
    properties:
        accountId: string
        configSrc: string
        name: string
        secret: string
    

    ZeroTrustTunnelCloudflared Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ZeroTrustTunnelCloudflared resource accepts the following input properties:

    AccountId 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
    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.
    ConfigSrc 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.
    AccountId 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
    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.
    ConfigSrc 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.
    accountId 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
    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.
    configSrc 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.
    accountId 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
    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.
    configSrc 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.
    account_id str
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    name str
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    secret str
    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 str
    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.
    accountId 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
    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.
    configSrc 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ZeroTrustTunnelCloudflared resource produces the following output properties:

    Cname string
    Usable CNAME for accessing the Tunnel.
    Id string
    The provider-assigned unique ID for this managed resource.
    TunnelToken string
    Token used by a connector to authenticate and run the tunnel.
    Cname string
    Usable CNAME for accessing the Tunnel.
    Id string
    The provider-assigned unique ID for this managed resource.
    TunnelToken string
    Token used by a connector to authenticate and run the tunnel.
    cname String
    Usable CNAME for accessing the Tunnel.
    id String
    The provider-assigned unique ID for this managed resource.
    tunnelToken String
    Token used by a connector to authenticate and run the tunnel.
    cname string
    Usable CNAME for accessing the Tunnel.
    id string
    The provider-assigned unique ID for this managed resource.
    tunnelToken string
    Token used by a connector to authenticate and run the tunnel.
    cname str
    Usable CNAME for accessing the Tunnel.
    id str
    The provider-assigned unique ID for this managed resource.
    tunnel_token str
    Token used by a connector to authenticate and run the tunnel.
    cname String
    Usable CNAME for accessing the Tunnel.
    id String
    The provider-assigned unique ID for this managed resource.
    tunnelToken String
    Token used by a connector to authenticate and run the tunnel.

    Look up Existing ZeroTrustTunnelCloudflared Resource

    Get an existing ZeroTrustTunnelCloudflared resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ZeroTrustTunnelCloudflaredState, opts?: CustomResourceOptions): ZeroTrustTunnelCloudflared
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            cname: Optional[str] = None,
            config_src: Optional[str] = None,
            name: Optional[str] = None,
            secret: Optional[str] = None,
            tunnel_token: Optional[str] = None) -> ZeroTrustTunnelCloudflared
    func GetZeroTrustTunnelCloudflared(ctx *Context, name string, id IDInput, state *ZeroTrustTunnelCloudflaredState, opts ...ResourceOption) (*ZeroTrustTunnelCloudflared, error)
    public static ZeroTrustTunnelCloudflared Get(string name, Input<string> id, ZeroTrustTunnelCloudflaredState? state, CustomResourceOptions? opts = null)
    public static ZeroTrustTunnelCloudflared get(String name, Output<String> id, ZeroTrustTunnelCloudflaredState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Cname string
    Usable CNAME for accessing the Tunnel.
    ConfigSrc 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.
    Name string
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    Secret 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.
    TunnelToken string
    Token used by a connector to authenticate and run the tunnel.
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Cname string
    Usable CNAME for accessing the Tunnel.
    ConfigSrc 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.
    Name string
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    Secret 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.
    TunnelToken string
    Token used by a connector to authenticate and run the tunnel.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cname String
    Usable CNAME for accessing the Tunnel.
    configSrc 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.
    name String
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    secret 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.
    tunnelToken String
    Token used by a connector to authenticate and run the tunnel.
    accountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cname string
    Usable CNAME for accessing the Tunnel.
    configSrc 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.
    name string
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    secret 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.
    tunnelToken string
    Token used by a connector to authenticate and run the tunnel.
    account_id str
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cname str
    Usable CNAME for accessing the Tunnel.
    config_src str
    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.
    name str
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    secret str
    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.
    tunnel_token str
    Token used by a connector to authenticate and run the tunnel.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cname String
    Usable CNAME for accessing the Tunnel.
    configSrc 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.
    name String
    A user-friendly name chosen when the tunnel is created. Modifying this attribute will force creation of a new resource.
    secret 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.
    tunnelToken String
    Token used by a connector to authenticate and run the tunnel.

    Import

    $ pulumi import cloudflare:index/zeroTrustTunnelCloudflared:ZeroTrustTunnelCloudflared example <account_id>/<tunnel_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.39.1 published on Tuesday, Sep 24, 2024 by Pulumi