1. Packages
  2. Cloudflare
  3. API Docs
  4. TunnelRoute
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

cloudflare.TunnelRoute

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a resource, that manages Cloudflare tunnel routes for Zero Trust. Tunnel routes are used to direct IP traffic through Cloudflare Tunnels.

    Create TunnelRoute Resource

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

    Constructor syntax

    new TunnelRoute(name: string, args: TunnelRouteArgs, opts?: CustomResourceOptions);
    @overload
    def TunnelRoute(resource_name: str,
                    args: TunnelRouteArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TunnelRoute(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    account_id: Optional[str] = None,
                    network: Optional[str] = None,
                    tunnel_id: Optional[str] = None,
                    comment: Optional[str] = None,
                    virtual_network_id: Optional[str] = None)
    func NewTunnelRoute(ctx *Context, name string, args TunnelRouteArgs, opts ...ResourceOption) (*TunnelRoute, error)
    public TunnelRoute(string name, TunnelRouteArgs args, CustomResourceOptions? opts = null)
    public TunnelRoute(String name, TunnelRouteArgs args)
    public TunnelRoute(String name, TunnelRouteArgs args, CustomResourceOptions options)
    
    type: cloudflare:TunnelRoute
    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 TunnelRouteArgs
    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 TunnelRouteArgs
    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 TunnelRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TunnelRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TunnelRouteArgs
    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 tunnelRouteResource = new Cloudflare.TunnelRoute("tunnelRouteResource", new()
    {
        AccountId = "string",
        Network = "string",
        TunnelId = "string",
        Comment = "string",
        VirtualNetworkId = "string",
    });
    
    example, err := cloudflare.NewTunnelRoute(ctx, "tunnelRouteResource", &cloudflare.TunnelRouteArgs{
    	AccountId:        pulumi.String("string"),
    	Network:          pulumi.String("string"),
    	TunnelId:         pulumi.String("string"),
    	Comment:          pulumi.String("string"),
    	VirtualNetworkId: pulumi.String("string"),
    })
    
    var tunnelRouteResource = new TunnelRoute("tunnelRouteResource", TunnelRouteArgs.builder()
        .accountId("string")
        .network("string")
        .tunnelId("string")
        .comment("string")
        .virtualNetworkId("string")
        .build());
    
    tunnel_route_resource = cloudflare.TunnelRoute("tunnelRouteResource",
        account_id="string",
        network="string",
        tunnel_id="string",
        comment="string",
        virtual_network_id="string")
    
    const tunnelRouteResource = new cloudflare.TunnelRoute("tunnelRouteResource", {
        accountId: "string",
        network: "string",
        tunnelId: "string",
        comment: "string",
        virtualNetworkId: "string",
    });
    
    type: cloudflare:TunnelRoute
    properties:
        accountId: string
        comment: string
        network: string
        tunnelId: string
        virtualNetworkId: string
    

    TunnelRoute 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 TunnelRoute 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.
    Network string
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    TunnelId string
    The ID of the tunnel that will service the tunnel route.
    Comment string
    Description of the tunnel route.
    VirtualNetworkId string
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    Network string
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    TunnelId string
    The ID of the tunnel that will service the tunnel route.
    Comment string
    Description of the tunnel route.
    VirtualNetworkId string
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    network String
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnelId String
    The ID of the tunnel that will service the tunnel route.
    comment String
    Description of the tunnel route.
    virtualNetworkId String
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    network string
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnelId string
    The ID of the tunnel that will service the tunnel route.
    comment string
    Description of the tunnel route.
    virtualNetworkId string
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    network str
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnel_id str
    The ID of the tunnel that will service the tunnel route.
    comment str
    Description of the tunnel route.
    virtual_network_id str
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    network String
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnelId String
    The ID of the tunnel that will service the tunnel route.
    comment String
    Description of the tunnel route.
    virtualNetworkId String
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. Modifying this attribute will force creation of a new resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TunnelRoute Resource

    Get an existing TunnelRoute 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?: TunnelRouteState, opts?: CustomResourceOptions): TunnelRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            comment: Optional[str] = None,
            network: Optional[str] = None,
            tunnel_id: Optional[str] = None,
            virtual_network_id: Optional[str] = None) -> TunnelRoute
    func GetTunnelRoute(ctx *Context, name string, id IDInput, state *TunnelRouteState, opts ...ResourceOption) (*TunnelRoute, error)
    public static TunnelRoute Get(string name, Input<string> id, TunnelRouteState? state, CustomResourceOptions? opts = null)
    public static TunnelRoute get(String name, Output<String> id, TunnelRouteState 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.
    Comment string
    Description of the tunnel route.
    Network string
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    TunnelId string
    The ID of the tunnel that will service the tunnel route.
    VirtualNetworkId string
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    Comment string
    Description of the tunnel route.
    Network string
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    TunnelId string
    The ID of the tunnel that will service the tunnel route.
    VirtualNetworkId string
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    comment String
    Description of the tunnel route.
    network String
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnelId String
    The ID of the tunnel that will service the tunnel route.
    virtualNetworkId String
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    comment string
    Description of the tunnel route.
    network string
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnelId string
    The ID of the tunnel that will service the tunnel route.
    virtualNetworkId string
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    comment str
    Description of the tunnel route.
    network str
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnel_id str
    The ID of the tunnel that will service the tunnel route.
    virtual_network_id str
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. 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.
    comment String
    Description of the tunnel route.
    network String
    The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
    tunnelId String
    The ID of the tunnel that will service the tunnel route.
    virtualNetworkId String
    The ID of the virtual network for which this route is being added; uses the default virtual network of the account if none is provided. Modifying this attribute will force creation of a new resource.

    Import

    $ pulumi import cloudflare:index/tunnelRoute:TunnelRoute example <account_id>/<network_cidr>/<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 v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi