Package com.pulumi.gcp.compute
Class RouterInterface
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.compute.RouterInterface
-
public class RouterInterface extends com.pulumi.resources.CustomResource
Manages a Cloud Router interface. For more information see [the official documentation](https://cloud.google.com/compute/docs/cloudrouter) and [API](https://cloud.google.com/compute/docs/reference/latest/routers). ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.compute.RouterInterface; import com.pulumi.gcp.compute.RouterInterfaceArgs; 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 foobar = new RouterInterface("foobar", RouterInterfaceArgs.builder() .ipRange("169.254.1.1/30") .region("us-central1") .router("router-1") .vpnTunnel("tunnel-1") .build()); } } ``` ## Import Router interfaces can be imported using the `project` (optional), `region`, `router`, and `name`, e.g. * `{{project_id}}/{{region}}/{{router}}/{{name}}` * `{{region}}/{{router}}/{{name}}` In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import router interfaces using one of the formats above. For exampletf import { id = "{{project_id}}/{{region}}/{{router}}/{{name}}" to = google_compute_router_interface.default } ```sh $ pulumi import gcp:compute/routerInterface:RouterInterface When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), router interfaces can be imported using one of the formats above. For example ``` ```sh $ pulumi import gcp:compute/routerInterface:RouterInterface default {{project_id}}/{{region}}/{{router}}/{{name}} ``` ```sh $ pulumi import gcp:compute/routerInterface:RouterInterface default {{region}}/{{router}}/{{name}} ```
-
-
Constructor Summary
Constructors Constructor Description RouterInterface(java.lang.String name)
RouterInterface(java.lang.String name, RouterInterfaceArgs args)
RouterInterface(java.lang.String name, RouterInterfaceArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RouterInterface
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RouterInterfaceState 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.util.Optional<java.lang.String>>
interconnectAttachment()
com.pulumi.core.Output<java.lang.String>
ipRange()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
privateIpAddress()
com.pulumi.core.Output<java.lang.String>
project()
com.pulumi.core.Output<java.lang.String>
redundantInterface()
com.pulumi.core.Output<java.lang.String>
region()
com.pulumi.core.Output<java.lang.String>
router()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
subnetwork()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
vpnTunnel()
-
-
-
Constructor Detail
-
RouterInterface
public RouterInterface(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
RouterInterface
public RouterInterface(java.lang.String name, RouterInterfaceArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
RouterInterface
public RouterInterface(java.lang.String name, RouterInterfaceArgs 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
-
interconnectAttachment
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> interconnectAttachment()
- Returns:
- The name or resource link to the VLAN interconnect for this interface. Changing this forces a new interface to be created. Only one of `vpn_tunnel`, `interconnect_attachment` or `subnetwork` can be specified.
-
ipRange
public com.pulumi.core.Output<java.lang.String> ipRange()
- Returns:
- IP address and range of the interface. The IP range must be in the RFC3927 link-local IP space. Changing this forces a new interface to be created.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A unique name for the interface, required by GCE. Changing this forces a new interface to be created.
-
privateIpAddress
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> privateIpAddress()
- Returns:
- The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance. Changing this forces a new interface to be created.
-
project
public com.pulumi.core.Output<java.lang.String> project()
- Returns:
- The ID of the project in which this interface's routerbelongs. If it is not provided, the provider project is used. Changing this forces a new interface to be created.
-
redundantInterface
public com.pulumi.core.Output<java.lang.String> redundantInterface()
- Returns:
- The name of the interface that is redundant to this interface. Changing this forces a new interface to be created.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region this interface's router sits in. If not specified, the project region will be used. Changing this forces a new interface to be created.
-
router
public com.pulumi.core.Output<java.lang.String> router()
- Returns:
- The name of the router this interface will be attached to. Changing this forces a new interface to be created. In addition to the above required fields, a router interface must have specified either `ip_range` or exactly one of `vpn_tunnel`, `interconnect_attachment` or `subnetwork`, or both. ***
-
subnetwork
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> subnetwork()
- Returns:
- The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here. Changing this forces a new interface to be created. Only one of `vpn_tunnel`, `interconnect_attachment` or `subnetwork` can be specified.
-
vpnTunnel
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpnTunnel()
- Returns:
- The name or resource link to the VPN tunnel this interface will be linked to. Changing this forces a new interface to be created. Only one of `vpn_tunnel`, `interconnect_attachment` or `subnetwork` can be specified.
-
get
public static RouterInterface get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable RouterInterfaceState 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.
-
-