Router

Represents a Router resource. To get more information about Router, see:

Example Usage

Router Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Router;
import com.pulumi.gcp.compute.RouterArgs;
import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
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 foobarNetwork = new Network("foobarNetwork", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var foobarRouter = new Router("foobarRouter", RouterArgs.builder()
.network(foobarNetwork.name())
.bgp(RouterBgpArgs.builder()
.asn(64514)
.advertiseMode("CUSTOM")
.advertisedGroups("ALL_SUBNETS")
.advertisedIpRanges(
RouterBgpAdvertisedIpRangeArgs.builder()
.range("1.2.3.4")
.build(),
RouterBgpAdvertisedIpRangeArgs.builder()
.range("6.7.0.0/16")
.build())
.build())
.build());
}
}

Compute Router Encrypted Interconnect

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Router;
import com.pulumi.gcp.compute.RouterArgs;
import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
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 network = new Network("network", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var encrypted_interconnect_router = new Router("encrypted-interconnect-router", RouterArgs.builder()
.network(network.name())
.encryptedInterconnectRouter(true)
.bgp(RouterBgpArgs.builder()
.asn(64514)
.build())
.build());
}
}

Import

Router can be imported using any of these accepted formats

$ pulumi import gcp:compute/router:Router default projects/{{project}}/regions/{{region}}/routers/{{name}}
$ pulumi import gcp:compute/router:Router default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/router:Router default {{region}}/{{name}}
$ pulumi import gcp:compute/router:Router default {{name}}

Properties

Link copied to clipboard
val bgp: Output<RouterBgp>?

BGP information specific to this router. Structure is documented below.

Link copied to clipboard

Creation timestamp in RFC3339 text format.

Link copied to clipboard
val description: Output<String>?

An optional description of this resource.

Link copied to clipboard

Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature). Not currently available publicly.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Link copied to clipboard
val network: Output<String>

A reference to the network to which this router belongs.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val region: Output<String>

Region where the router resides.

Link copied to clipboard
val selfLink: Output<String>

The URI of the created resource.

Link copied to clipboard
val urn: Output<String>