1. Packages
  2. Cloudflare
  3. API Docs
  4. getTunnelVirtualNetwork
Cloudflare v5.34.0 published on Friday, Jul 12, 2024 by Pulumi

cloudflare.getTunnelVirtualNetwork

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.34.0 published on Friday, Jul 12, 2024 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",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.get_tunnel_virtual_network(account_id="f037e56e89293a057740de681ac9abbe",
        name="example")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: cloudflare:getTunnelVirtualNetwork
          Arguments:
            accountId: f037e56e89293a057740de681ac9abbe
            name: example
    

    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>
    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]
    func LookupTunnelVirtualNetwork(ctx *Context, args *LookupTunnelVirtualNetworkArgs, opts ...InvokeOption) (*LookupTunnelVirtualNetworkResult, error)
    func LookupTunnelVirtualNetworkOutput(ctx *Context, args *LookupTunnelVirtualNetworkOutputArgs, opts ...InvokeOption) LookupTunnelVirtualNetworkResultOutput

    > 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)
    }
    public static CompletableFuture<GetTunnelVirtualNetworkResult> getTunnelVirtualNetwork(GetTunnelVirtualNetworkArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cloudflare:index/getTunnelVirtualNetwork:getTunnelVirtualNetwork
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    The account identifier to target for the resource.
    Name string
    The Virtual Network Name.
    AccountId string
    The account identifier to target for the resource.
    Name string
    The Virtual Network Name.
    accountId String
    The account identifier to target for the resource.
    name String
    The Virtual Network Name.
    accountId string
    The account identifier to target for the resource.
    name string
    The Virtual Network Name.
    account_id str
    The account identifier to target for the resource.
    name str
    The Virtual Network Name.
    accountId String
    The account identifier to target for the resource.
    name 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 logo
    Cloudflare v5.34.0 published on Friday, Jul 12, 2024 by Pulumi