Router Interface Args
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/v7/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
})
}
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()
.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 thepulumi 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
Properties
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.
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.
The name of the interface that is redundant to this interface. Changing this forces a new interface to be created.
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.
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.