RouterPeerArgs

data class RouterPeerArgs(val advertiseMode: Output<String>? = null, val advertisedGroups: Output<List<String>>? = null, val advertisedIpRanges: Output<List<RouterPeerAdvertisedIpRangeArgs>>? = null, val advertisedRoutePriority: Output<Int>? = null, val bfd: Output<RouterPeerBfdArgs>? = null, val enable: Output<Boolean>? = null, val enableIpv6: Output<Boolean>? = null, val interface: Output<String>? = null, val ipAddress: Output<String>? = null, val ipv6NexthopAddress: Output<String>? = null, val name: Output<String>? = null, val peerAsn: Output<Int>? = null, val peerIpAddress: Output<String>? = null, val peerIpv6NexthopAddress: Output<String>? = null, val project: Output<String>? = null, val region: Output<String>? = null, val router: Output<String>? = null, val routerApplianceInstance: Output<String>? = null) : ConvertibleToJava<RouterPeerArgs>

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273. To get more information about RouterBgpPeer, see:

Example Usage

Router Peer Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RouterPeer;
import com.pulumi.gcp.compute.RouterPeerArgs;
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 peer = new RouterPeer("peer", RouterPeerArgs.builder()
.advertisedRoutePriority(100)
.interface_("interface-1")
.peerAsn(65513)
.region("us-central1")
.router("my-router")
.build());
}
}

Router Peer Disabled

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RouterPeer;
import com.pulumi.gcp.compute.RouterPeerArgs;
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 peer = new RouterPeer("peer", RouterPeerArgs.builder()
.advertisedRoutePriority(100)
.enable(false)
.interface_("interface-1")
.peerAsn(65513)
.peerIpAddress("169.254.1.2")
.region("us-central1")
.router("my-router")
.build());
}
}

Router Peer Bfd

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RouterPeer;
import com.pulumi.gcp.compute.RouterPeerArgs;
import com.pulumi.gcp.compute.inputs.RouterPeerBfdArgs;
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 peer = new RouterPeer("peer", RouterPeerArgs.builder()
.advertisedRoutePriority(100)
.bfd(RouterPeerBfdArgs.builder()
.minReceiveInterval(1000)
.minTransmitInterval(1000)
.multiplier(5)
.sessionInitializationMode("ACTIVE")
.build())
.interface_("interface-1")
.peerAsn(65513)
.peerIpAddress("169.254.1.2")
.region("us-central1")
.router("my-router")
.build());
}
}

Router Peer Router Appliance

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.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.AddressArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
import com.pulumi.gcp.networkconnectivity.Hub;
import com.pulumi.gcp.networkconnectivity.Spoke;
import com.pulumi.gcp.networkconnectivity.SpokeArgs;
import com.pulumi.gcp.networkconnectivity.inputs.SpokeLinkedRouterApplianceInstancesArgs;
import com.pulumi.gcp.compute.Router;
import com.pulumi.gcp.compute.RouterArgs;
import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
import com.pulumi.gcp.compute.RouterInterface;
import com.pulumi.gcp.compute.RouterInterfaceArgs;
import com.pulumi.gcp.compute.RouterPeer;
import com.pulumi.gcp.compute.RouterPeerArgs;
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 subnetwork = new Subnetwork("subnetwork", SubnetworkArgs.builder()
.network(network.selfLink())
.ipCidrRange("10.0.0.0/16")
.region("us-central1")
.build());
var addrIntf = new Address("addrIntf", AddressArgs.builder()
.region(subnetwork.region())
.subnetwork(subnetwork.id())
.addressType("INTERNAL")
.build());
var addrIntfRedundant = new Address("addrIntfRedundant", AddressArgs.builder()
.region(subnetwork.region())
.subnetwork(subnetwork.id())
.addressType("INTERNAL")
.build());
var addrPeer = new Address("addrPeer", AddressArgs.builder()
.region(subnetwork.region())
.subnetwork(subnetwork.id())
.addressType("INTERNAL")
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.zone("us-central1-a")
.machineType("e2-medium")
.canIpForward(true)
.bootDisk(InstanceBootDiskArgs.builder()
.initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
.image("debian-cloud/debian-11")
.build())
.build())
.networkInterfaces(InstanceNetworkInterfaceArgs.builder()
.networkIp(addrPeer.address())
.subnetwork(subnetwork.selfLink())
.build())
.build());
var hub = new Hub("hub");
var spoke = new Spoke("spoke", SpokeArgs.builder()
.location(subnetwork.region())
.hub(hub.id())
.linkedRouterApplianceInstances(SpokeLinkedRouterApplianceInstancesArgs.builder()
.instances(SpokeLinkedRouterApplianceInstancesInstanceArgs.builder()
.virtualMachine(instance.selfLink())
.ipAddress(addrPeer.address())
.build())
.siteToSiteDataTransfer(false)
.build())
.build());
var router = new Router("router", RouterArgs.builder()
.region(subnetwork.region())
.network(network.selfLink())
.bgp(RouterBgpArgs.builder()
.asn(64514)
.build())
.build());
var interfaceRedundant = new RouterInterface("interfaceRedundant", RouterInterfaceArgs.builder()
.region(router.region())
.router(router.name())
.subnetwork(subnetwork.selfLink())
.privateIpAddress(addrIntfRedundant.address())
.build());
var interface_ = new RouterInterface("interface", RouterInterfaceArgs.builder()
.region(router.region())
.router(router.name())
.subnetwork(subnetwork.selfLink())
.privateIpAddress(addrIntf.address())
.redundantInterface(interfaceRedundant.name())
.build());
var peer = new RouterPeer("peer", RouterPeerArgs.builder()
.router(router.name())
.region(router.region())
.interface_(interface_.name())
.routerApplianceInstance(instance.selfLink())
.peerAsn(65513)
.peerIpAddress(addrPeer.address())
.build());
}
}

Import

RouterBgpPeer can be imported using any of these accepted formats

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

Constructors

Link copied to clipboard
constructor(advertiseMode: Output<String>? = null, advertisedGroups: Output<List<String>>? = null, advertisedIpRanges: Output<List<RouterPeerAdvertisedIpRangeArgs>>? = null, advertisedRoutePriority: Output<Int>? = null, bfd: Output<RouterPeerBfdArgs>? = null, enable: Output<Boolean>? = null, enableIpv6: Output<Boolean>? = null, interface: Output<String>? = null, ipAddress: Output<String>? = null, ipv6NexthopAddress: Output<String>? = null, name: Output<String>? = null, peerAsn: Output<Int>? = null, peerIpAddress: Output<String>? = null, peerIpv6NexthopAddress: Output<String>? = null, project: Output<String>? = null, region: Output<String>? = null, router: Output<String>? = null, routerApplianceInstance: Output<String>? = null)

Properties

Link copied to clipboard
val advertisedGroups: Output<List<String>>? = null

User-specified list of prefix groups to advertise in custom mode, which currently supports the following option:

Link copied to clipboard

User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. Structure is documented below.

Link copied to clipboard
val advertisedRoutePriority: Output<Int>? = null

The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.

Link copied to clipboard
val advertiseMode: Output<String>? = null

User-specified flag to indicate which mode to use for advertisement. Valid values of this enum field are: DEFAULT, CUSTOM Default value is DEFAULT. Possible values are: DEFAULT, CUSTOM.

Link copied to clipboard
val bfd: Output<RouterPeerBfdArgs>? = null

BFD configuration for the BGP peering. Structure is documented below.

Link copied to clipboard
val enable: Output<Boolean>? = null

The status of the BGP peer connection. If set to false, any active session with the peer is terminated and all associated routing information is removed. If set to true, the peer connection can be established with routing information. The default is true.

Link copied to clipboard
val enableIpv6: Output<Boolean>? = null

Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.

Link copied to clipboard
val interface: Output<String>? = null

Name of the interface the BGP peer is associated with.

Link copied to clipboard
val ipAddress: Output<String>? = null

IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.

Link copied to clipboard
val ipv6NexthopAddress: Output<String>? = null

IPv6 address of the interface inside Google Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, Google Cloud automatically assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you.

Link copied to clipboard
val name: Output<String>? = null

Name of this BGP peer. 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 peerAsn: Output<Int>? = null

Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.

Link copied to clipboard
val peerIpAddress: Output<String>? = null

IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. Required if ip_address is set.

Link copied to clipboard
val peerIpv6NexthopAddress: Output<String>? = null

IPv6 address of the BGP interface outside Google Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, Google Cloud automatically assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you.

Link copied to clipboard
val project: Output<String>? = null

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

Link copied to clipboard
val region: Output<String>? = null

Region where the router and BgpPeer reside. If it is not provided, the provider region is used.

Link copied to clipboard
val router: Output<String>? = null

The name of the Cloud Router in which this BgpPeer will be configured.

Link copied to clipboard
val routerApplianceInstance: Output<String>? = null

The URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.

Functions

Link copied to clipboard
open override fun toJava(): RouterPeerArgs