1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getTunnelVirtualNetwork
Cloudflare v5.49.1 published on Tuesday, Feb 18, 2025 by Pulumi

cloudflare.getTunnelVirtualNetwork

Explore with Pulumi AI

Cloudflare v5.49.1 published on Tuesday, Feb 18, 2025 by Pulumi

Use this datasource to lookup a tunnel virtual network in an account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const example = cloudflare.getTunnelVirtualNetwork({
    accountId: "f037e56e89293a057740de681ac9abbe",
    name: "example",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example = cloudflare.get_tunnel_virtual_network(account_id="f037e56e89293a057740de681ac9abbe",
    name="example")
Copy
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.LookupTunnelVirtualNetwork(ctx, &cloudflare.LookupTunnelVirtualNetworkArgs{
			AccountId: "f037e56e89293a057740de681ac9abbe",
			Name:      "example",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var example = Cloudflare.GetTunnelVirtualNetwork.Invoke(new()
    {
        AccountId = "f037e56e89293a057740de681ac9abbe",
        Name = "example",
    });

});
Copy
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.GetTunnelVirtualNetworkArgs;
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.getTunnelVirtualNetwork(GetTunnelVirtualNetworkArgs.builder()
            .accountId("f037e56e89293a057740de681ac9abbe")
            .name("example")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: cloudflare:getTunnelVirtualNetwork
      arguments:
        accountId: f037e56e89293a057740de681ac9abbe
        name: example
Copy

Using getTunnelVirtualNetwork

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 getTunnelVirtualNetwork(args: GetTunnelVirtualNetworkArgs, opts?: InvokeOptions): Promise<GetTunnelVirtualNetworkResult>
function getTunnelVirtualNetworkOutput(args: GetTunnelVirtualNetworkOutputArgs, opts?: InvokeOptions): Output<GetTunnelVirtualNetworkResult>
Copy
def get_tunnel_virtual_network(account_id: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetTunnelVirtualNetworkResult
def get_tunnel_virtual_network_output(account_id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetTunnelVirtualNetworkResult]
Copy
func LookupTunnelVirtualNetwork(ctx *Context, args *LookupTunnelVirtualNetworkArgs, opts ...InvokeOption) (*LookupTunnelVirtualNetworkResult, error)
func LookupTunnelVirtualNetworkOutput(ctx *Context, args *LookupTunnelVirtualNetworkOutputArgs, opts ...InvokeOption) LookupTunnelVirtualNetworkResultOutput
Copy

> Note: This function is named LookupTunnelVirtualNetwork in the Go SDK.

public static class GetTunnelVirtualNetwork 
{
    public static Task<GetTunnelVirtualNetworkResult> InvokeAsync(GetTunnelVirtualNetworkArgs args, InvokeOptions? opts = null)
    public static Output<GetTunnelVirtualNetworkResult> Invoke(GetTunnelVirtualNetworkInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTunnelVirtualNetworkResult> getTunnelVirtualNetwork(GetTunnelVirtualNetworkArgs args, InvokeOptions options)
public static Output<GetTunnelVirtualNetworkResult> getTunnelVirtualNetwork(GetTunnelVirtualNetworkArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getTunnelVirtualNetwork:getTunnelVirtualNetwork
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId This property is required. string
The account identifier to target for the resource.
Name This property is required. string
The Virtual Network Name.
AccountId This property is required. string
The account identifier to target for the resource.
Name This property is required. string
The Virtual Network Name.
accountId This property is required. String
The account identifier to target for the resource.
name This property is required. String
The Virtual Network Name.
accountId This property is required. string
The account identifier to target for the resource.
name This property is required. string
The Virtual Network Name.
account_id This property is required. str
The account identifier to target for the resource.
name This property is required. str
The Virtual Network Name.
accountId This property is required. String
The account identifier to target for the resource.
name This property is required. String
The Virtual Network Name.

getTunnelVirtualNetwork Result

The following output properties are available:

AccountId string
The account identifier to target for the resource.
Comment string
The Virtual Network Comment.
Id string
The provider-assigned unique ID for this managed resource.
IsDefault bool
If true, only include deleted virtual networks. If false, exclude deleted virtual networks. If empty, all virtual networks will be included.
Name string
The Virtual Network Name.
AccountId string
The account identifier to target for the resource.
Comment string
The Virtual Network Comment.
Id string
The provider-assigned unique ID for this managed resource.
IsDefault bool
If true, only include deleted virtual networks. If false, exclude deleted virtual networks. If empty, all virtual networks will be included.
Name string
The Virtual Network Name.
accountId String
The account identifier to target for the resource.
comment String
The Virtual Network Comment.
id String
The provider-assigned unique ID for this managed resource.
isDefault Boolean
If true, only include deleted virtual networks. If false, exclude deleted virtual networks. If empty, all virtual networks will be included.
name String
The Virtual Network Name.
accountId string
The account identifier to target for the resource.
comment string
The Virtual Network Comment.
id string
The provider-assigned unique ID for this managed resource.
isDefault boolean
If true, only include deleted virtual networks. If false, exclude deleted virtual networks. If empty, all virtual networks will be included.
name string
The Virtual Network Name.
account_id str
The account identifier to target for the resource.
comment str
The Virtual Network Comment.
id str
The provider-assigned unique ID for this managed resource.
is_default bool
If true, only include deleted virtual networks. If false, exclude deleted virtual networks. If empty, all virtual networks will be included.
name str
The Virtual Network Name.
accountId String
The account identifier to target for the resource.
comment String
The Virtual Network Comment.
id String
The provider-assigned unique ID for this managed resource.
isDefault Boolean
If true, only include deleted virtual networks. If false, exclude deleted virtual networks. If empty, all virtual networks will be included.
name String
The Virtual Network Name.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.
Cloudflare v5.49.1 published on Tuesday, Feb 18, 2025 by Pulumi