1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. TunnelVirtualNetwork
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.TunnelVirtualNetwork

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
    Deprecated: cloudflare.index/tunnelvirtualnetwork.TunnelVirtualNetwork has been deprecated in favor of cloudflare.index/zerotrusttunnelcloudflaredvirtualnetwork.ZeroTrustTunnelCloudflaredVirtualNetwork

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleZeroTrustTunnelCloudflaredVirtualNetwork = new cloudflare.ZeroTrustTunnelCloudflaredVirtualNetwork("example_zero_trust_tunnel_cloudflared_virtual_network", {
        accountId: "699d98642c564d2e855e9661899b7252",
        name: "us-east-1-vpc",
        comment: "Staging VPC for data science",
        isDefault: true,
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zero_trust_tunnel_cloudflared_virtual_network = cloudflare.ZeroTrustTunnelCloudflaredVirtualNetwork("example_zero_trust_tunnel_cloudflared_virtual_network",
        account_id="699d98642c564d2e855e9661899b7252",
        name="us-east-1-vpc",
        comment="Staging VPC for data science",
        is_default=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewZeroTrustTunnelCloudflaredVirtualNetwork(ctx, "example_zero_trust_tunnel_cloudflared_virtual_network", &cloudflare.ZeroTrustTunnelCloudflaredVirtualNetworkArgs{
    			AccountId: pulumi.String("699d98642c564d2e855e9661899b7252"),
    			Name:      pulumi.String("us-east-1-vpc"),
    			Comment:   pulumi.String("Staging VPC for data science"),
    			IsDefault: pulumi.Bool(true),
    		})
    		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 exampleZeroTrustTunnelCloudflaredVirtualNetwork = new Cloudflare.ZeroTrustTunnelCloudflaredVirtualNetwork("example_zero_trust_tunnel_cloudflared_virtual_network", new()
        {
            AccountId = "699d98642c564d2e855e9661899b7252",
            Name = "us-east-1-vpc",
            Comment = "Staging VPC for data science",
            IsDefault = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ZeroTrustTunnelCloudflaredVirtualNetwork;
    import com.pulumi.cloudflare.ZeroTrustTunnelCloudflaredVirtualNetworkArgs;
    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 exampleZeroTrustTunnelCloudflaredVirtualNetwork = new ZeroTrustTunnelCloudflaredVirtualNetwork("exampleZeroTrustTunnelCloudflaredVirtualNetwork", ZeroTrustTunnelCloudflaredVirtualNetworkArgs.builder()
                .accountId("699d98642c564d2e855e9661899b7252")
                .name("us-east-1-vpc")
                .comment("Staging VPC for data science")
                .isDefault(true)
                .build());
    
        }
    }
    
    resources:
      exampleZeroTrustTunnelCloudflaredVirtualNetwork:
        type: cloudflare:ZeroTrustTunnelCloudflaredVirtualNetwork
        name: example_zero_trust_tunnel_cloudflared_virtual_network
        properties:
          accountId: 699d98642c564d2e855e9661899b7252
          name: us-east-1-vpc
          comment: Staging VPC for data science
          isDefault: true
    

    Create TunnelVirtualNetwork Resource

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

    Constructor syntax

    new TunnelVirtualNetwork(name: string, args: TunnelVirtualNetworkArgs, opts?: CustomResourceOptions);
    @overload
    def TunnelVirtualNetwork(resource_name: str,
                             args: TunnelVirtualNetworkArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TunnelVirtualNetwork(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             account_id: Optional[str] = None,
                             comment: Optional[str] = None,
                             is_default: Optional[bool] = None,
                             is_default_network: Optional[bool] = None,
                             name: Optional[str] = None)
    func NewTunnelVirtualNetwork(ctx *Context, name string, args TunnelVirtualNetworkArgs, opts ...ResourceOption) (*TunnelVirtualNetwork, error)
    public TunnelVirtualNetwork(string name, TunnelVirtualNetworkArgs args, CustomResourceOptions? opts = null)
    public TunnelVirtualNetwork(String name, TunnelVirtualNetworkArgs args)
    public TunnelVirtualNetwork(String name, TunnelVirtualNetworkArgs args, CustomResourceOptions options)
    
    type: cloudflare:TunnelVirtualNetwork
    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 TunnelVirtualNetworkArgs
    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 TunnelVirtualNetworkArgs
    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 TunnelVirtualNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TunnelVirtualNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TunnelVirtualNetworkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TunnelVirtualNetwork Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TunnelVirtualNetwork resource accepts the following input properties:

    AccountId string
    Cloudflare account ID
    Name string
    A user-friendly name for the virtual network.
    Comment string
    Optional remark describing the virtual network.
    IsDefault bool
    If true, this virtual network is the default for the account.
    IsDefaultNetwork bool
    If true, this virtual network is the default for the account.
    AccountId string
    Cloudflare account ID
    Name string
    A user-friendly name for the virtual network.
    Comment string
    Optional remark describing the virtual network.
    IsDefault bool
    If true, this virtual network is the default for the account.
    IsDefaultNetwork bool
    If true, this virtual network is the default for the account.
    accountId String
    Cloudflare account ID
    name String
    A user-friendly name for the virtual network.
    comment String
    Optional remark describing the virtual network.
    isDefault Boolean
    If true, this virtual network is the default for the account.
    isDefaultNetwork Boolean
    If true, this virtual network is the default for the account.
    accountId string
    Cloudflare account ID
    name string
    A user-friendly name for the virtual network.
    comment string
    Optional remark describing the virtual network.
    isDefault boolean
    If true, this virtual network is the default for the account.
    isDefaultNetwork boolean
    If true, this virtual network is the default for the account.
    account_id str
    Cloudflare account ID
    name str
    A user-friendly name for the virtual network.
    comment str
    Optional remark describing the virtual network.
    is_default bool
    If true, this virtual network is the default for the account.
    is_default_network bool
    If true, this virtual network is the default for the account.
    accountId String
    Cloudflare account ID
    name String
    A user-friendly name for the virtual network.
    comment String
    Optional remark describing the virtual network.
    isDefault Boolean
    If true, this virtual network is the default for the account.
    isDefaultNetwork Boolean
    If true, this virtual network is the default for the account.

    Outputs

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

    CreatedAt string
    Timestamp of when the resource was created.
    DeletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt string
    Timestamp of when the resource was created.
    DeletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdAt String
    Timestamp of when the resource was created.
    deletedAt String
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt string
    Timestamp of when the resource was created.
    deletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at str
    Timestamp of when the resource was created.
    deleted_at str
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt String
    Timestamp of when the resource was created.
    deletedAt String
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TunnelVirtualNetwork Resource

    Get an existing TunnelVirtualNetwork 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?: TunnelVirtualNetworkState, opts?: CustomResourceOptions): TunnelVirtualNetwork
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            comment: Optional[str] = None,
            created_at: Optional[str] = None,
            deleted_at: Optional[str] = None,
            is_default: Optional[bool] = None,
            is_default_network: Optional[bool] = None,
            name: Optional[str] = None) -> TunnelVirtualNetwork
    func GetTunnelVirtualNetwork(ctx *Context, name string, id IDInput, state *TunnelVirtualNetworkState, opts ...ResourceOption) (*TunnelVirtualNetwork, error)
    public static TunnelVirtualNetwork Get(string name, Input<string> id, TunnelVirtualNetworkState? state, CustomResourceOptions? opts = null)
    public static TunnelVirtualNetwork get(String name, Output<String> id, TunnelVirtualNetworkState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:TunnelVirtualNetwork    get:      id: ${id}
    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
    Cloudflare account ID
    Comment string
    Optional remark describing the virtual network.
    CreatedAt string
    Timestamp of when the resource was created.
    DeletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    IsDefault bool
    If true, this virtual network is the default for the account.
    IsDefaultNetwork bool
    If true, this virtual network is the default for the account.
    Name string
    A user-friendly name for the virtual network.
    AccountId string
    Cloudflare account ID
    Comment string
    Optional remark describing the virtual network.
    CreatedAt string
    Timestamp of when the resource was created.
    DeletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    IsDefault bool
    If true, this virtual network is the default for the account.
    IsDefaultNetwork bool
    If true, this virtual network is the default for the account.
    Name string
    A user-friendly name for the virtual network.
    accountId String
    Cloudflare account ID
    comment String
    Optional remark describing the virtual network.
    createdAt String
    Timestamp of when the resource was created.
    deletedAt String
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    isDefault Boolean
    If true, this virtual network is the default for the account.
    isDefaultNetwork Boolean
    If true, this virtual network is the default for the account.
    name String
    A user-friendly name for the virtual network.
    accountId string
    Cloudflare account ID
    comment string
    Optional remark describing the virtual network.
    createdAt string
    Timestamp of when the resource was created.
    deletedAt string
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    isDefault boolean
    If true, this virtual network is the default for the account.
    isDefaultNetwork boolean
    If true, this virtual network is the default for the account.
    name string
    A user-friendly name for the virtual network.
    account_id str
    Cloudflare account ID
    comment str
    Optional remark describing the virtual network.
    created_at str
    Timestamp of when the resource was created.
    deleted_at str
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    is_default bool
    If true, this virtual network is the default for the account.
    is_default_network bool
    If true, this virtual network is the default for the account.
    name str
    A user-friendly name for the virtual network.
    accountId String
    Cloudflare account ID
    comment String
    Optional remark describing the virtual network.
    createdAt String
    Timestamp of when the resource was created.
    deletedAt String
    Timestamp of when the resource was deleted. If null, the resource has not been deleted.
    isDefault Boolean
    If true, this virtual network is the default for the account.
    isDefaultNetwork Boolean
    If true, this virtual network is the default for the account.
    name String
    A user-friendly name for the virtual network.

    Import

    $ pulumi import cloudflare:index/tunnelVirtualNetwork:TunnelVirtualNetwork example '<account_id>/<virtual_network_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 v6.1.2 published on Monday, Apr 28, 2025 by Pulumi