cloudflare.SplitTunnel
Explore with Pulumi AI
Provides a Cloudflare Split Tunnel resource. Split tunnels are used to either include or exclude lists of routes from the WARP client’s tunnel.
Create SplitTunnel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SplitTunnel(name: string, args: SplitTunnelArgs, opts?: CustomResourceOptions);
@overload
def SplitTunnel(resource_name: str,
args: SplitTunnelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SplitTunnel(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
mode: Optional[str] = None,
tunnels: Optional[Sequence[SplitTunnelTunnelArgs]] = None,
policy_id: Optional[str] = None)
func NewSplitTunnel(ctx *Context, name string, args SplitTunnelArgs, opts ...ResourceOption) (*SplitTunnel, error)
public SplitTunnel(string name, SplitTunnelArgs args, CustomResourceOptions? opts = null)
public SplitTunnel(String name, SplitTunnelArgs args)
public SplitTunnel(String name, SplitTunnelArgs args, CustomResourceOptions options)
type: cloudflare:SplitTunnel
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 SplitTunnelArgs
- 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 SplitTunnelArgs
- 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 SplitTunnelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SplitTunnelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SplitTunnelArgs
- 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 splitTunnelResource = new Cloudflare.SplitTunnel("splitTunnelResource", new()
{
AccountId = "string",
Mode = "string",
Tunnels = new[]
{
new Cloudflare.Inputs.SplitTunnelTunnelArgs
{
Address = "string",
Description = "string",
Host = "string",
},
},
PolicyId = "string",
});
example, err := cloudflare.NewSplitTunnel(ctx, "splitTunnelResource", &cloudflare.SplitTunnelArgs{
AccountId: pulumi.String("string"),
Mode: pulumi.String("string"),
Tunnels: cloudflare.SplitTunnelTunnelArray{
&cloudflare.SplitTunnelTunnelArgs{
Address: pulumi.String("string"),
Description: pulumi.String("string"),
Host: pulumi.String("string"),
},
},
PolicyId: pulumi.String("string"),
})
var splitTunnelResource = new SplitTunnel("splitTunnelResource", SplitTunnelArgs.builder()
.accountId("string")
.mode("string")
.tunnels(SplitTunnelTunnelArgs.builder()
.address("string")
.description("string")
.host("string")
.build())
.policyId("string")
.build());
split_tunnel_resource = cloudflare.SplitTunnel("splitTunnelResource",
account_id="string",
mode="string",
tunnels=[{
"address": "string",
"description": "string",
"host": "string",
}],
policy_id="string")
const splitTunnelResource = new cloudflare.SplitTunnel("splitTunnelResource", {
accountId: "string",
mode: "string",
tunnels: [{
address: "string",
description: "string",
host: "string",
}],
policyId: "string",
});
type: cloudflare:SplitTunnel
properties:
accountId: string
mode: string
policyId: string
tunnels:
- address: string
description: string
host: string
SplitTunnel 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 SplitTunnel resource accepts the following input properties:
- Account
Id string - The account identifier to target for the resource.
- Mode string
- The mode of the split tunnel policy. Available values:
include
,exclude
. - Tunnels
List<Split
Tunnel Tunnel> - The value of the tunnel attributes.
- Policy
Id string - The settings policy for which to configure this split tunnel policy.
- Account
Id string - The account identifier to target for the resource.
- Mode string
- The mode of the split tunnel policy. Available values:
include
,exclude
. - Tunnels
[]Split
Tunnel Tunnel Args - The value of the tunnel attributes.
- Policy
Id string - The settings policy for which to configure this split tunnel policy.
- account
Id String - The account identifier to target for the resource.
- mode String
- The mode of the split tunnel policy. Available values:
include
,exclude
. - tunnels
List<Split
Tunnel Tunnel> - The value of the tunnel attributes.
- policy
Id String - The settings policy for which to configure this split tunnel policy.
- account
Id string - The account identifier to target for the resource.
- mode string
- The mode of the split tunnel policy. Available values:
include
,exclude
. - tunnels
Split
Tunnel Tunnel[] - The value of the tunnel attributes.
- policy
Id string - The settings policy for which to configure this split tunnel policy.
- account_
id str - The account identifier to target for the resource.
- mode str
- The mode of the split tunnel policy. Available values:
include
,exclude
. - tunnels
Sequence[Split
Tunnel Tunnel Args] - The value of the tunnel attributes.
- policy_
id str - The settings policy for which to configure this split tunnel policy.
- account
Id String - The account identifier to target for the resource.
- mode String
- The mode of the split tunnel policy. Available values:
include
,exclude
. - tunnels List<Property Map>
- The value of the tunnel attributes.
- policy
Id String - The settings policy for which to configure this split tunnel policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the SplitTunnel 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 SplitTunnel Resource
Get an existing SplitTunnel 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?: SplitTunnelState, opts?: CustomResourceOptions): SplitTunnel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
mode: Optional[str] = None,
policy_id: Optional[str] = None,
tunnels: Optional[Sequence[SplitTunnelTunnelArgs]] = None) -> SplitTunnel
func GetSplitTunnel(ctx *Context, name string, id IDInput, state *SplitTunnelState, opts ...ResourceOption) (*SplitTunnel, error)
public static SplitTunnel Get(string name, Input<string> id, SplitTunnelState? state, CustomResourceOptions? opts = null)
public static SplitTunnel get(String name, Output<String> id, SplitTunnelState 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.
- Account
Id string - The account identifier to target for the resource.
- Mode string
- The mode of the split tunnel policy. Available values:
include
,exclude
. - Policy
Id string - The settings policy for which to configure this split tunnel policy.
- Tunnels
List<Split
Tunnel Tunnel> - The value of the tunnel attributes.
- Account
Id string - The account identifier to target for the resource.
- Mode string
- The mode of the split tunnel policy. Available values:
include
,exclude
. - Policy
Id string - The settings policy for which to configure this split tunnel policy.
- Tunnels
[]Split
Tunnel Tunnel Args - The value of the tunnel attributes.
- account
Id String - The account identifier to target for the resource.
- mode String
- The mode of the split tunnel policy. Available values:
include
,exclude
. - policy
Id String - The settings policy for which to configure this split tunnel policy.
- tunnels
List<Split
Tunnel Tunnel> - The value of the tunnel attributes.
- account
Id string - The account identifier to target for the resource.
- mode string
- The mode of the split tunnel policy. Available values:
include
,exclude
. - policy
Id string - The settings policy for which to configure this split tunnel policy.
- tunnels
Split
Tunnel Tunnel[] - The value of the tunnel attributes.
- account_
id str - The account identifier to target for the resource.
- mode str
- The mode of the split tunnel policy. Available values:
include
,exclude
. - policy_
id str - The settings policy for which to configure this split tunnel policy.
- tunnels
Sequence[Split
Tunnel Tunnel Args] - The value of the tunnel attributes.
- account
Id String - The account identifier to target for the resource.
- mode String
- The mode of the split tunnel policy. Available values:
include
,exclude
. - policy
Id String - The settings policy for which to configure this split tunnel policy.
- tunnels List<Property Map>
- The value of the tunnel attributes.
Supporting Types
SplitTunnelTunnel, SplitTunnelTunnelArgs
- Address string
- The address for the tunnel.
- Description string
- A description for the tunnel.
- Host string
- The domain name for the tunnel.
- Address string
- The address for the tunnel.
- Description string
- A description for the tunnel.
- Host string
- The domain name for the tunnel.
- address String
- The address for the tunnel.
- description String
- A description for the tunnel.
- host String
- The domain name for the tunnel.
- address string
- The address for the tunnel.
- description string
- A description for the tunnel.
- host string
- The domain name for the tunnel.
- address str
- The address for the tunnel.
- description str
- A description for the tunnel.
- host str
- The domain name for the tunnel.
- address String
- The address for the tunnel.
- description String
- A description for the tunnel.
- host String
- The domain name for the tunnel.
Import
Split Tunnels for default device policies must use “default” as the policy ID.
$ pulumi import cloudflare:index/splitTunnel:SplitTunnel example <account_id>/<policy_id>/<mode>
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.