Cloudflare v5.39.1 published on Tuesday, Sep 24, 2024 by Pulumi
cloudflare.getTunnel
Explore with Pulumi AI
Use this datasource to lookup a tunnel in an account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = cloudflare.getTunnel({
    accountId: "f037e56e89293a057740de681ac9abbe",
    name: "my-tunnel",
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.get_tunnel(account_id="f037e56e89293a057740de681ac9abbe",
    name="my-tunnel")
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.LookupTunnel(ctx, &cloudflare.LookupTunnelArgs{
			AccountId: "f037e56e89293a057740de681ac9abbe",
			Name:      "my-tunnel",
		}, nil)
		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 = Cloudflare.GetTunnel.Invoke(new()
    {
        AccountId = "f037e56e89293a057740de681ac9abbe",
        Name = "my-tunnel",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetTunnelArgs;
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) {
        final var example = CloudflareFunctions.getTunnel(GetTunnelArgs.builder()
            .accountId("f037e56e89293a057740de681ac9abbe")
            .name("my-tunnel")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      Function: cloudflare:getTunnel
      Arguments:
        accountId: f037e56e89293a057740de681ac9abbe
        name: my-tunnel
Using getTunnel
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTunnel(args: GetTunnelArgs, opts?: InvokeOptions): Promise<GetTunnelResult>
function getTunnelOutput(args: GetTunnelOutputArgs, opts?: InvokeOptions): Output<GetTunnelResult>def get_tunnel(account_id: Optional[str] = None,
               is_deleted: Optional[bool] = None,
               name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetTunnelResult
def get_tunnel_output(account_id: Optional[pulumi.Input[str]] = None,
               is_deleted: Optional[pulumi.Input[bool]] = None,
               name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetTunnelResult]func LookupTunnel(ctx *Context, args *LookupTunnelArgs, opts ...InvokeOption) (*LookupTunnelResult, error)
func LookupTunnelOutput(ctx *Context, args *LookupTunnelOutputArgs, opts ...InvokeOption) LookupTunnelResultOutput> Note: This function is named LookupTunnel in the Go SDK.
public static class GetTunnel 
{
    public static Task<GetTunnelResult> InvokeAsync(GetTunnelArgs args, InvokeOptions? opts = null)
    public static Output<GetTunnelResult> Invoke(GetTunnelInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTunnelResult> getTunnel(GetTunnelArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: cloudflare:index/getTunnel:getTunnel
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccountId string
- The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Name string
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- IsDeleted bool
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- IsDeleted bool
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- isDeleted Boolean
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- isDeleted boolean
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- is_deleted bool
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- isDeleted Boolean
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. Modifying this attribute will force creation of a new resource.
getTunnel Result
The following output properties are available:
- AccountId string
- The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Id string
- ID of the tunnel.
- Name string
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- RemoteConfig bool
- Whether the tunnel can be configured remotely from the Zero Trust dashboard.
- Status string
- The status of the tunnel. Available values: inactive,degraded,healthy,down.
- TunnelType string
- The type of the tunnel. Available values: cfd_tunnel,warp_connector.
- IsDeleted bool
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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.
- Id string
- ID of the tunnel.
- Name string
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- RemoteConfig bool
- Whether the tunnel can be configured remotely from the Zero Trust dashboard.
- Status string
- The status of the tunnel. Available values: inactive,degraded,healthy,down.
- TunnelType string
- The type of the tunnel. Available values: cfd_tunnel,warp_connector.
- IsDeleted bool
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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.
- id String
- ID of the tunnel.
- name String
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- remoteConfig Boolean
- Whether the tunnel can be configured remotely from the Zero Trust dashboard.
- status String
- The status of the tunnel. Available values: inactive,degraded,healthy,down.
- tunnelType String
- The type of the tunnel. Available values: cfd_tunnel,warp_connector.
- isDeleted Boolean
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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.
- id string
- ID of the tunnel.
- name string
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- remoteConfig boolean
- Whether the tunnel can be configured remotely from the Zero Trust dashboard.
- status string
- The status of the tunnel. Available values: inactive,degraded,healthy,down.
- tunnelType string
- The type of the tunnel. Available values: cfd_tunnel,warp_connector.
- isDeleted boolean
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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.
- id str
- ID of the tunnel.
- name str
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- remote_config bool
- Whether the tunnel can be configured remotely from the Zero Trust dashboard.
- status str
- The status of the tunnel. Available values: inactive,degraded,healthy,down.
- tunnel_type str
- The type of the tunnel. Available values: cfd_tunnel,warp_connector.
- is_deleted bool
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. 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.
- id String
- ID of the tunnel.
- name String
- Name of the tunnel. Modifying this attribute will force creation of a new resource.
- remoteConfig Boolean
- Whether the tunnel can be configured remotely from the Zero Trust dashboard.
- status String
- The status of the tunnel. Available values: inactive,degraded,healthy,down.
- tunnelType String
- The type of the tunnel. Available values: cfd_tunnel,warp_connector.
- isDeleted Boolean
- If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. Modifying this attribute will force creation of a new resource.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the cloudflareTerraform Provider.