Package com.pulumi.cloudflare
Class TunnelRoute
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.cloudflare.TunnelRoute
-
public class TunnelRoute extends com.pulumi.resources.CustomResource
Provides a resource, that manages Cloudflare tunnel routes for Zero Trust. Tunnel routes are used to direct IP traffic through Cloudflare Tunnels. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.cloudflare.TunnelRoute; import com.pulumi.cloudflare.TunnelRouteArgs; import com.pulumi.cloudflare.Tunnel; import com.pulumi.cloudflare.TunnelArgs; 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 exampleTunnelRoute = new TunnelRoute("exampleTunnelRoute", TunnelRouteArgs.builder() .accountId("f037e56e89293a057740de681ac9abbe") .tunnelId("f70ff985-a4ef-4643-bbbc-4a0ed4fc8415") .network("192.0.2.24/32") .comment("New tunnel route for documentation") .virtualNetworkId("bdc39a3c-3104-4c23-8ac0-9f455dda691a") .build()); var tunnel = new Tunnel("tunnel", TunnelArgs.builder() .accountId("f037e56e89293a057740de681ac9abbe") .name("my_tunnel") .secret("AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=") .build()); var exampleIndex_tunnelRouteTunnelRoute = new TunnelRoute("exampleIndex/tunnelRouteTunnelRoute", TunnelRouteArgs.builder() .accountId("f037e56e89293a057740de681ac9abbe") .tunnelId(tunnel.id()) .network("192.0.2.24/32") .comment("New tunnel route for documentation") .virtualNetworkId("bdc39a3c-3104-4c23-8ac0-9f455dda691a") .build()); } } ``` ## Import ```sh $ pulumi import cloudflare:index/tunnelRoute:TunnelRoute example <account_id>/<network_cidr>/<virtual_network_id> ```
-
-
Constructor Summary
Constructors Constructor Description TunnelRoute(java.lang.String name)
TunnelRoute(java.lang.String name, TunnelRouteArgs args)
TunnelRoute(java.lang.String name, TunnelRouteArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
accountId()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
comment()
static TunnelRoute
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TunnelRouteState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
network()
com.pulumi.core.Output<java.lang.String>
tunnelId()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
virtualNetworkId()
-
-
-
Constructor Detail
-
TunnelRoute
public TunnelRoute(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
TunnelRoute
public TunnelRoute(java.lang.String name, TunnelRouteArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
TunnelRoute
public TunnelRoute(java.lang.String name, TunnelRouteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
accountId
public com.pulumi.core.Output<java.lang.String> accountId()
- Returns:
- The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
-
comment
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> comment()
- Returns:
- Description of the tunnel route.
-
network
public com.pulumi.core.Output<java.lang.String> network()
- Returns:
- The IPv4 or IPv6 network that should use this tunnel route, in CIDR notation.
-
tunnelId
public com.pulumi.core.Output<java.lang.String> tunnelId()
- Returns:
- The ID of the tunnel that will service the tunnel route.
-
virtualNetworkId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> virtualNetworkId()
- Returns:
- 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.**
-
get
public static TunnelRoute get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TunnelRouteState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-