RouterInterface class
Manages a Cloud Router interface. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foobar = new gcp.compute.RouterInterface("foobar", {
name: "interface-1",
router: "router-1",
region: "us-central1",
ipRange: "169.254.1.1/30",
vpnTunnel: "tunnel-1",
});
import pulumi
import pulumi_gcp as gcp
foobar = gcp.compute.RouterInterface("foobar",
name="interface-1",
router="router-1",
region="us-central1",
ip_range="169.254.1.1/30",
vpn_tunnel="tunnel-1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var foobar = new Gcp.Compute.RouterInterface("foobar", new()
{
Name = "interface-1",
Router = "router-1",
Region = "us-central1",
IpRange = "169.254.1.1/30",
VpnTunnel = "tunnel-1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewRouterInterface(ctx, "foobar", &compute.RouterInterfaceArgs{
Name: pulumi.String("interface-1"),
Router: pulumi.String("router-1"),
Region: pulumi.String("us-central1"),
IpRange: pulumi.String("169.254.1.1/30"),
VpnTunnel: pulumi.String("tunnel-1"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_compute_routerinterface" "foobar" {
name = "interface-1"
router = "router-1"
region = "us-central1"
ip_range = "169.254.1.1/30"
vpn_tunnel = "tunnel-1"
}
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.ArrayList;
import java.util.Arrays;
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()
.name("interface-1")
.router("router-1")
.region("us-central1")
.ipRange("169.254.1.1/30")
.vpnTunnel("tunnel-1")
.build());
}
}
resources:
foobar:
type: gcp:compute:RouterInterface
properties:
name: interface-1
router: router-1
region: us-central1
ipRange: 169.254.1.1/30
vpnTunnel: tunnel-1
Import
Router interfaces can be imported using the project (optional), region, router, and name, e.g.
{{project_id}}/{{region}}/{{router}}/{{name}}{{region}}/{{router}}/{{name}}
When using the pulumi import command, router interfaces can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/routerInterface:RouterInterface default {{project_id}}/{{region}}/{{router}}/{{name}}
$ pulumi import gcp:compute/routerInterface:RouterInterface default {{region}}/{{router}}/{{name}}
Constructors
- RouterInterface(String name, {RouterInterfaceArgs? args, CustomResourceOptions? options})
-
Creates a new RouterInterface.
nameThe Pulumi resource name.argsArguments used to configure this RouterInterface. The set of arguments for RouterInterface.optionsResource options controlling this resource's behavior. - RouterInterface.reference(String urn)
- Creates a typed reference to an existing RouterInterface resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE".
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
interconnectAttachment
↔ Output<
String?> -
The name or resource link to the
VLAN interconnect for this interface. Changing this forces a new interface to
be created. Only one of
vpnTunnel,interconnectAttachmentorsubnetworkcan be specified.latefinal -
ipRange
↔ Output<
String> -
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.
latefinal
-
ipVersion
↔ Output<
String> -
IP version of this interface. Can be either IPV4 or IPV6.
latefinal
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
name
↔ Output<
String> -
A unique name for the interface, required by GCE. Changing
this forces a new interface to be created.
latefinal
-
privateIpAddress
↔ Output<
String?> -
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.
latefinal
-
project
↔ Output<
String> -
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.
latefinal
-
redundantInterface
↔ Output<
String> -
The name of the interface that is redundant to
this interface. Changing this forces a new interface to be created.
latefinal
-
region
↔ Output<
String> -
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.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
router
↔ Output<
String> -
The name of the router this interface will be attached to.
Changing this forces a new interface to be created.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subnetwork
↔ Output<
String?> -
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
vpnTunnel,interconnectAttachmentorsubnetworkcan be specified.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
vpnTunnel
↔ Output<
String?> -
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
vpnTunnel,interconnectAttachmentorsubnetworkcan be specified.latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {RouterInterfaceState? state, CustomResourceOptions? options}) → RouterInterface -
Gets an existing RouterInterface resource's state with the given
nameandid.