All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.compute.kotlin.RouterPeer.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.compute.kotlin.outputs.RouterPeerAdvertisedIpRange
import com.pulumi.gcp.compute.kotlin.outputs.RouterPeerBfd
import com.pulumi.gcp.compute.kotlin.outputs.RouterPeerMd5AuthenticationKey
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.gcp.compute.kotlin.outputs.RouterPeerAdvertisedIpRange.Companion.toKotlin as routerPeerAdvertisedIpRangeToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RouterPeerBfd.Companion.toKotlin as routerPeerBfdToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RouterPeerMd5AuthenticationKey.Companion.toKotlin as routerPeerMd5AuthenticationKeyToKotlin

/**
 * Builder for [RouterPeer].
 */
@PulumiTagMarker
public class RouterPeerResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: RouterPeerArgs = RouterPeerArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend RouterPeerArgsBuilder.() -> Unit) {
        val builder = RouterPeerArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): RouterPeer {
        val builtJavaResource = com.pulumi.gcp.compute.RouterPeer(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return RouterPeer(builtJavaResource)
    }
}

/**
 * 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:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/routers)
 * * How-to Guides
 *     * [Google Cloud Router](https://cloud.google.com/router/docs/)
 * ## Example Usage
 * ### Router Peer Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const peer = new gcp.compute.RouterPeer("peer", {
 *     name: "my-router-peer",
 *     router: "my-router",
 *     region: "us-central1",
 *     peerAsn: 65513,
 *     advertisedRoutePriority: 100,
 *     "interface": "interface-1",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * peer = gcp.compute.RouterPeer("peer",
 *     name="my-router-peer",
 *     router="my-router",
 *     region="us-central1",
 *     peer_asn=65513,
 *     advertised_route_priority=100,
 *     interface="interface-1")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var peer = new Gcp.Compute.RouterPeer("peer", new()
 *     {
 *         Name = "my-router-peer",
 *         Router = "my-router",
 *         Region = "us-central1",
 *         PeerAsn = 65513,
 *         AdvertisedRoutePriority = 100,
 *         Interface = "interface-1",
 *     });
 * });
 * ```
 * ```go
 * 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.NewRouterPeer(ctx, "peer", &compute.RouterPeerArgs{
 * 			Name:                    pulumi.String("my-router-peer"),
 * 			Router:                  pulumi.String("my-router"),
 * 			Region:                  pulumi.String("us-central1"),
 * 			PeerAsn:                 pulumi.Int(65513),
 * 			AdvertisedRoutePriority: pulumi.Int(100),
 * 			Interface:               pulumi.String("interface-1"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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()
 *             .name("my-router-peer")
 *             .router("my-router")
 *             .region("us-central1")
 *             .peerAsn(65513)
 *             .advertisedRoutePriority(100)
 *             .interface_("interface-1")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   peer:
 *     type: gcp:compute:RouterPeer
 *     properties:
 *       name: my-router-peer
 *       router: my-router
 *       region: us-central1
 *       peerAsn: 65513
 *       advertisedRoutePriority: 100
 *       interface: interface-1
 * ```
 * 
 * ### Router Peer Disabled
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const peer = new gcp.compute.RouterPeer("peer", {
 *     name: "my-router-peer",
 *     router: "my-router",
 *     region: "us-central1",
 *     peerIpAddress: "169.254.1.2",
 *     peerAsn: 65513,
 *     advertisedRoutePriority: 100,
 *     "interface": "interface-1",
 *     enable: false,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * peer = gcp.compute.RouterPeer("peer",
 *     name="my-router-peer",
 *     router="my-router",
 *     region="us-central1",
 *     peer_ip_address="169.254.1.2",
 *     peer_asn=65513,
 *     advertised_route_priority=100,
 *     interface="interface-1",
 *     enable=False)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var peer = new Gcp.Compute.RouterPeer("peer", new()
 *     {
 *         Name = "my-router-peer",
 *         Router = "my-router",
 *         Region = "us-central1",
 *         PeerIpAddress = "169.254.1.2",
 *         PeerAsn = 65513,
 *         AdvertisedRoutePriority = 100,
 *         Interface = "interface-1",
 *         Enable = false,
 *     });
 * });
 * ```
 * ```go
 * 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.NewRouterPeer(ctx, "peer", &compute.RouterPeerArgs{
 * 			Name:                    pulumi.String("my-router-peer"),
 * 			Router:                  pulumi.String("my-router"),
 * 			Region:                  pulumi.String("us-central1"),
 * 			PeerIpAddress:           pulumi.String("169.254.1.2"),
 * 			PeerAsn:                 pulumi.Int(65513),
 * 			AdvertisedRoutePriority: pulumi.Int(100),
 * 			Interface:               pulumi.String("interface-1"),
 * 			Enable:                  pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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()
 *             .name("my-router-peer")
 *             .router("my-router")
 *             .region("us-central1")
 *             .peerIpAddress("169.254.1.2")
 *             .peerAsn(65513)
 *             .advertisedRoutePriority(100)
 *             .interface_("interface-1")
 *             .enable(false)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   peer:
 *     type: gcp:compute:RouterPeer
 *     properties:
 *       name: my-router-peer
 *       router: my-router
 *       region: us-central1
 *       peerIpAddress: 169.254.1.2
 *       peerAsn: 65513
 *       advertisedRoutePriority: 100
 *       interface: interface-1
 *       enable: false
 * ```
 * 
 * ### Router Peer Bfd
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const peer = new gcp.compute.RouterPeer("peer", {
 *     name: "my-router-peer",
 *     router: "my-router",
 *     region: "us-central1",
 *     peerIpAddress: "169.254.1.2",
 *     peerAsn: 65513,
 *     advertisedRoutePriority: 100,
 *     "interface": "interface-1",
 *     bfd: {
 *         minReceiveInterval: 1000,
 *         minTransmitInterval: 1000,
 *         multiplier: 5,
 *         sessionInitializationMode: "ACTIVE",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * peer = gcp.compute.RouterPeer("peer",
 *     name="my-router-peer",
 *     router="my-router",
 *     region="us-central1",
 *     peer_ip_address="169.254.1.2",
 *     peer_asn=65513,
 *     advertised_route_priority=100,
 *     interface="interface-1",
 *     bfd=gcp.compute.RouterPeerBfdArgs(
 *         min_receive_interval=1000,
 *         min_transmit_interval=1000,
 *         multiplier=5,
 *         session_initialization_mode="ACTIVE",
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var peer = new Gcp.Compute.RouterPeer("peer", new()
 *     {
 *         Name = "my-router-peer",
 *         Router = "my-router",
 *         Region = "us-central1",
 *         PeerIpAddress = "169.254.1.2",
 *         PeerAsn = 65513,
 *         AdvertisedRoutePriority = 100,
 *         Interface = "interface-1",
 *         Bfd = new Gcp.Compute.Inputs.RouterPeerBfdArgs
 *         {
 *             MinReceiveInterval = 1000,
 *             MinTransmitInterval = 1000,
 *             Multiplier = 5,
 *             SessionInitializationMode = "ACTIVE",
 *         },
 *     });
 * });
 * ```
 * ```go
 * 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.NewRouterPeer(ctx, "peer", &compute.RouterPeerArgs{
 * 			Name:                    pulumi.String("my-router-peer"),
 * 			Router:                  pulumi.String("my-router"),
 * 			Region:                  pulumi.String("us-central1"),
 * 			PeerIpAddress:           pulumi.String("169.254.1.2"),
 * 			PeerAsn:                 pulumi.Int(65513),
 * 			AdvertisedRoutePriority: pulumi.Int(100),
 * 			Interface:               pulumi.String("interface-1"),
 * 			Bfd: &compute.RouterPeerBfdArgs{
 * 				MinReceiveInterval:        pulumi.Int(1000),
 * 				MinTransmitInterval:       pulumi.Int(1000),
 * 				Multiplier:                pulumi.Int(5),
 * 				SessionInitializationMode: pulumi.String("ACTIVE"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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()
 *             .name("my-router-peer")
 *             .router("my-router")
 *             .region("us-central1")
 *             .peerIpAddress("169.254.1.2")
 *             .peerAsn(65513)
 *             .advertisedRoutePriority(100)
 *             .interface_("interface-1")
 *             .bfd(RouterPeerBfdArgs.builder()
 *                 .minReceiveInterval(1000)
 *                 .minTransmitInterval(1000)
 *                 .multiplier(5)
 *                 .sessionInitializationMode("ACTIVE")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   peer:
 *     type: gcp:compute:RouterPeer
 *     properties:
 *       name: my-router-peer
 *       router: my-router
 *       region: us-central1
 *       peerIpAddress: 169.254.1.2
 *       peerAsn: 65513
 *       advertisedRoutePriority: 100
 *       interface: interface-1
 *       bfd:
 *         minReceiveInterval: 1000
 *         minTransmitInterval: 1000
 *         multiplier: 5
 *         sessionInitializationMode: ACTIVE
 * ```
 * 
 * ### Router Peer Router Appliance
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const network = new gcp.compute.Network("network", {
 *     name: "my-router-net",
 *     autoCreateSubnetworks: false,
 * });
 * const subnetwork = new gcp.compute.Subnetwork("subnetwork", {
 *     name: "my-router-sub",
 *     network: network.selfLink,
 *     ipCidrRange: "10.0.0.0/16",
 *     region: "us-central1",
 * });
 * const addrIntf = new gcp.compute.Address("addr_intf", {
 *     name: "my-router-addr-intf",
 *     region: subnetwork.region,
 *     subnetwork: subnetwork.id,
 *     addressType: "INTERNAL",
 * });
 * const addrIntfRedundant = new gcp.compute.Address("addr_intf_redundant", {
 *     name: "my-router-addr-intf-red",
 *     region: subnetwork.region,
 *     subnetwork: subnetwork.id,
 *     addressType: "INTERNAL",
 * });
 * const addrPeer = new gcp.compute.Address("addr_peer", {
 *     name: "my-router-addr-peer",
 *     region: subnetwork.region,
 *     subnetwork: subnetwork.id,
 *     addressType: "INTERNAL",
 * });
 * const instance = new gcp.compute.Instance("instance", {
 *     name: "router-appliance",
 *     zone: "us-central1-a",
 *     machineType: "e2-medium",
 *     canIpForward: true,
 *     bootDisk: {
 *         initializeParams: {
 *             image: "debian-cloud/debian-11",
 *         },
 *     },
 *     networkInterfaces: [{
 *         networkIp: addrPeer.address,
 *         subnetwork: subnetwork.selfLink,
 *     }],
 * });
 * const hub = new gcp.networkconnectivity.Hub("hub", {name: "my-router-hub"});
 * const spoke = new gcp.networkconnectivity.Spoke("spoke", {
 *     name: "my-router-spoke",
 *     location: subnetwork.region,
 *     hub: hub.id,
 *     linkedRouterApplianceInstances: {
 *         instances: [{
 *             virtualMachine: instance.selfLink,
 *             ipAddress: addrPeer.address,
 *         }],
 *         siteToSiteDataTransfer: false,
 *     },
 * });
 * const router = new gcp.compute.Router("router", {
 *     name: "my-router-router",
 *     region: subnetwork.region,
 *     network: network.selfLink,
 *     bgp: {
 *         asn: 64514,
 *     },
 * });
 * const interfaceRedundant = new gcp.compute.RouterInterface("interface_redundant", {
 *     name: "my-router-intf-red",
 *     region: router.region,
 *     router: router.name,
 *     subnetwork: subnetwork.selfLink,
 *     privateIpAddress: addrIntfRedundant.address,
 * });
 * const _interface = new gcp.compute.RouterInterface("interface", {
 *     name: "my-router-intf",
 *     region: router.region,
 *     router: router.name,
 *     subnetwork: subnetwork.selfLink,
 *     privateIpAddress: addrIntf.address,
 *     redundantInterface: interfaceRedundant.name,
 * });
 * const peer = new gcp.compute.RouterPeer("peer", {
 *     name: "my-router-peer",
 *     router: router.name,
 *     region: router.region,
 *     "interface": _interface.name,
 *     routerApplianceInstance: instance.selfLink,
 *     peerAsn: 65513,
 *     peerIpAddress: addrPeer.address,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * network = gcp.compute.Network("network",
 *     name="my-router-net",
 *     auto_create_subnetworks=False)
 * subnetwork = gcp.compute.Subnetwork("subnetwork",
 *     name="my-router-sub",
 *     network=network.self_link,
 *     ip_cidr_range="10.0.0.0/16",
 *     region="us-central1")
 * addr_intf = gcp.compute.Address("addr_intf",
 *     name="my-router-addr-intf",
 *     region=subnetwork.region,
 *     subnetwork=subnetwork.id,
 *     address_type="INTERNAL")
 * addr_intf_redundant = gcp.compute.Address("addr_intf_redundant",
 *     name="my-router-addr-intf-red",
 *     region=subnetwork.region,
 *     subnetwork=subnetwork.id,
 *     address_type="INTERNAL")
 * addr_peer = gcp.compute.Address("addr_peer",
 *     name="my-router-addr-peer",
 *     region=subnetwork.region,
 *     subnetwork=subnetwork.id,
 *     address_type="INTERNAL")
 * instance = gcp.compute.Instance("instance",
 *     name="router-appliance",
 *     zone="us-central1-a",
 *     machine_type="e2-medium",
 *     can_ip_forward=True,
 *     boot_disk=gcp.compute.InstanceBootDiskArgs(
 *         initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
 *             image="debian-cloud/debian-11",
 *         ),
 *     ),
 *     network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
 *         network_ip=addr_peer.address,
 *         subnetwork=subnetwork.self_link,
 *     )])
 * hub = gcp.networkconnectivity.Hub("hub", name="my-router-hub")
 * spoke = gcp.networkconnectivity.Spoke("spoke",
 *     name="my-router-spoke",
 *     location=subnetwork.region,
 *     hub=hub.id,
 *     linked_router_appliance_instances=gcp.networkconnectivity.SpokeLinkedRouterApplianceInstancesArgs(
 *         instances=[gcp.networkconnectivity.SpokeLinkedRouterApplianceInstancesInstanceArgs(
 *             virtual_machine=instance.self_link,
 *             ip_address=addr_peer.address,
 *         )],
 *         site_to_site_data_transfer=False,
 *     ))
 * router = gcp.compute.Router("router",
 *     name="my-router-router",
 *     region=subnetwork.region,
 *     network=network.self_link,
 *     bgp=gcp.compute.RouterBgpArgs(
 *         asn=64514,
 *     ))
 * interface_redundant = gcp.compute.RouterInterface("interface_redundant",
 *     name="my-router-intf-red",
 *     region=router.region,
 *     router=router.name,
 *     subnetwork=subnetwork.self_link,
 *     private_ip_address=addr_intf_redundant.address)
 * interface = gcp.compute.RouterInterface("interface",
 *     name="my-router-intf",
 *     region=router.region,
 *     router=router.name,
 *     subnetwork=subnetwork.self_link,
 *     private_ip_address=addr_intf.address,
 *     redundant_interface=interface_redundant.name)
 * peer = gcp.compute.RouterPeer("peer",
 *     name="my-router-peer",
 *     router=router.name,
 *     region=router.region,
 *     interface=interface.name,
 *     router_appliance_instance=instance.self_link,
 *     peer_asn=65513,
 *     peer_ip_address=addr_peer.address)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var network = new Gcp.Compute.Network("network", new()
 *     {
 *         Name = "my-router-net",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var subnetwork = new Gcp.Compute.Subnetwork("subnetwork", new()
 *     {
 *         Name = "my-router-sub",
 *         Network = network.SelfLink,
 *         IpCidrRange = "10.0.0.0/16",
 *         Region = "us-central1",
 *     });
 *     var addrIntf = new Gcp.Compute.Address("addr_intf", new()
 *     {
 *         Name = "my-router-addr-intf",
 *         Region = subnetwork.Region,
 *         Subnetwork = subnetwork.Id,
 *         AddressType = "INTERNAL",
 *     });
 *     var addrIntfRedundant = new Gcp.Compute.Address("addr_intf_redundant", new()
 *     {
 *         Name = "my-router-addr-intf-red",
 *         Region = subnetwork.Region,
 *         Subnetwork = subnetwork.Id,
 *         AddressType = "INTERNAL",
 *     });
 *     var addrPeer = new Gcp.Compute.Address("addr_peer", new()
 *     {
 *         Name = "my-router-addr-peer",
 *         Region = subnetwork.Region,
 *         Subnetwork = subnetwork.Id,
 *         AddressType = "INTERNAL",
 *     });
 *     var instance = new Gcp.Compute.Instance("instance", new()
 *     {
 *         Name = "router-appliance",
 *         Zone = "us-central1-a",
 *         MachineType = "e2-medium",
 *         CanIpForward = true,
 *         BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
 *         {
 *             InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
 *             {
 *                 Image = "debian-cloud/debian-11",
 *             },
 *         },
 *         NetworkInterfaces = new[]
 *         {
 *             new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
 *             {
 *                 NetworkIp = addrPeer.IPAddress,
 *                 Subnetwork = subnetwork.SelfLink,
 *             },
 *         },
 *     });
 *     var hub = new Gcp.NetworkConnectivity.Hub("hub", new()
 *     {
 *         Name = "my-router-hub",
 *     });
 *     var spoke = new Gcp.NetworkConnectivity.Spoke("spoke", new()
 *     {
 *         Name = "my-router-spoke",
 *         Location = subnetwork.Region,
 *         Hub = hub.Id,
 *         LinkedRouterApplianceInstances = new Gcp.NetworkConnectivity.Inputs.SpokeLinkedRouterApplianceInstancesArgs
 *         {
 *             Instances = new[]
 *             {
 *                 new Gcp.NetworkConnectivity.Inputs.SpokeLinkedRouterApplianceInstancesInstanceArgs
 *                 {
 *                     VirtualMachine = instance.SelfLink,
 *                     IpAddress = addrPeer.IPAddress,
 *                 },
 *             },
 *             SiteToSiteDataTransfer = false,
 *         },
 *     });
 *     var router = new Gcp.Compute.Router("router", new()
 *     {
 *         Name = "my-router-router",
 *         Region = subnetwork.Region,
 *         Network = network.SelfLink,
 *         Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
 *         {
 *             Asn = 64514,
 *         },
 *     });
 *     var interfaceRedundant = new Gcp.Compute.RouterInterface("interface_redundant", new()
 *     {
 *         Name = "my-router-intf-red",
 *         Region = router.Region,
 *         Router = router.Name,
 *         Subnetwork = subnetwork.SelfLink,
 *         PrivateIpAddress = addrIntfRedundant.IPAddress,
 *     });
 *     var @interface = new Gcp.Compute.RouterInterface("interface", new()
 *     {
 *         Name = "my-router-intf",
 *         Region = router.Region,
 *         Router = router.Name,
 *         Subnetwork = subnetwork.SelfLink,
 *         PrivateIpAddress = addrIntf.IPAddress,
 *         RedundantInterface = interfaceRedundant.Name,
 *     });
 *     var peer = new Gcp.Compute.RouterPeer("peer", new()
 *     {
 *         Name = "my-router-peer",
 *         Router = router.Name,
 *         Region = router.Region,
 *         Interface = @interface.Name,
 *         RouterApplianceInstance = instance.SelfLink,
 *         PeerAsn = 65513,
 *         PeerIpAddress = addrPeer.IPAddress,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * pulumi.Run(func(ctx *pulumi.Context) error {
 * network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
 * Name: pulumi.String("my-router-net"),
 * AutoCreateSubnetworks: pulumi.Bool(false),
 * })
 * if err != nil {
 * return err
 * }
 * subnetwork, err := compute.NewSubnetwork(ctx, "subnetwork", &compute.SubnetworkArgs{
 * Name: pulumi.String("my-router-sub"),
 * Network: network.SelfLink,
 * IpCidrRange: pulumi.String("10.0.0.0/16"),
 * Region: pulumi.String("us-central1"),
 * })
 * if err != nil {
 * return err
 * }
 * addrIntf, err := compute.NewAddress(ctx, "addr_intf", &compute.AddressArgs{
 * Name: pulumi.String("my-router-addr-intf"),
 * Region: subnetwork.Region,
 * Subnetwork: subnetwork.ID(),
 * AddressType: pulumi.String("INTERNAL"),
 * })
 * if err != nil {
 * return err
 * }
 * addrIntfRedundant, err := compute.NewAddress(ctx, "addr_intf_redundant", &compute.AddressArgs{
 * Name: pulumi.String("my-router-addr-intf-red"),
 * Region: subnetwork.Region,
 * Subnetwork: subnetwork.ID(),
 * AddressType: pulumi.String("INTERNAL"),
 * })
 * if err != nil {
 * return err
 * }
 * addrPeer, err := compute.NewAddress(ctx, "addr_peer", &compute.AddressArgs{
 * Name: pulumi.String("my-router-addr-peer"),
 * Region: subnetwork.Region,
 * Subnetwork: subnetwork.ID(),
 * AddressType: pulumi.String("INTERNAL"),
 * })
 * if err != nil {
 * return err
 * }
 * instance, err := compute.NewInstance(ctx, "instance", &compute.InstanceArgs{
 * Name: pulumi.String("router-appliance"),
 * Zone: pulumi.String("us-central1-a"),
 * MachineType: pulumi.String("e2-medium"),
 * CanIpForward: pulumi.Bool(true),
 * BootDisk: &compute.InstanceBootDiskArgs{
 * InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
 * Image: pulumi.String("debian-cloud/debian-11"),
 * },
 * },
 * NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
 * &compute.InstanceNetworkInterfaceArgs{
 * NetworkIp: addrPeer.Address,
 * Subnetwork: subnetwork.SelfLink,
 * },
 * },
 * })
 * if err != nil {
 * return err
 * }
 * hub, err := networkconnectivity.NewHub(ctx, "hub", &networkconnectivity.HubArgs{
 * Name: pulumi.String("my-router-hub"),
 * })
 * if err != nil {
 * return err
 * }
 * _, err = networkconnectivity.NewSpoke(ctx, "spoke", &networkconnectivity.SpokeArgs{
 * Name: pulumi.String("my-router-spoke"),
 * Location: subnetwork.Region,
 * Hub: hub.ID(),
 * LinkedRouterApplianceInstances: &networkconnectivity.SpokeLinkedRouterApplianceInstancesArgs{
 * Instances: networkconnectivity.SpokeLinkedRouterApplianceInstancesInstanceArray{
 * &networkconnectivity.SpokeLinkedRouterApplianceInstancesInstanceArgs{
 * VirtualMachine: instance.SelfLink,
 * IpAddress: addrPeer.Address,
 * },
 * },
 * SiteToSiteDataTransfer: pulumi.Bool(false),
 * },
 * })
 * if err != nil {
 * return err
 * }
 * router, err := compute.NewRouter(ctx, "router", &compute.RouterArgs{
 * Name: pulumi.String("my-router-router"),
 * Region: subnetwork.Region,
 * Network: network.SelfLink,
 * Bgp: &compute.RouterBgpArgs{
 * Asn: pulumi.Int(64514),
 * },
 * })
 * if err != nil {
 * return err
 * }
 * interfaceRedundant, err := compute.NewRouterInterface(ctx, "interface_redundant", &compute.RouterInterfaceArgs{
 * Name: pulumi.String("my-router-intf-red"),
 * Region: router.Region,
 * Router: router.Name,
 * Subnetwork: subnetwork.SelfLink,
 * PrivateIpAddress: addrIntfRedundant.Address,
 * })
 * if err != nil {
 * return err
 * }
 * interface, err := compute.NewRouterInterface(ctx, "interface", &compute.RouterInterfaceArgs{
 * Name: pulumi.String("my-router-intf"),
 * Region: router.Region,
 * Router: router.Name,
 * Subnetwork: subnetwork.SelfLink,
 * PrivateIpAddress: addrIntf.Address,
 * RedundantInterface: interfaceRedundant.Name,
 * })
 * if err != nil {
 * return err
 * }
 * _, err = compute.NewRouterPeer(ctx, "peer", &compute.RouterPeerArgs{
 * Name: pulumi.String("my-router-peer"),
 * Router: router.Name,
 * Region: router.Region,
 * Interface: interface.Name,
 * RouterApplianceInstance: instance.SelfLink,
 * PeerAsn: pulumi.Int(65513),
 * PeerIpAddress: addrPeer.Address,
 * })
 * if err != nil {
 * return err
 * }
 * return nil
 * })
 * }
 * ```
 * ```java
 * 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.HubArgs;
 * 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()
 *             .name("my-router-net")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var subnetwork = new Subnetwork("subnetwork", SubnetworkArgs.builder()
 *             .name("my-router-sub")
 *             .network(network.selfLink())
 *             .ipCidrRange("10.0.0.0/16")
 *             .region("us-central1")
 *             .build());
 *         var addrIntf = new Address("addrIntf", AddressArgs.builder()
 *             .name("my-router-addr-intf")
 *             .region(subnetwork.region())
 *             .subnetwork(subnetwork.id())
 *             .addressType("INTERNAL")
 *             .build());
 *         var addrIntfRedundant = new Address("addrIntfRedundant", AddressArgs.builder()
 *             .name("my-router-addr-intf-red")
 *             .region(subnetwork.region())
 *             .subnetwork(subnetwork.id())
 *             .addressType("INTERNAL")
 *             .build());
 *         var addrPeer = new Address("addrPeer", AddressArgs.builder()
 *             .name("my-router-addr-peer")
 *             .region(subnetwork.region())
 *             .subnetwork(subnetwork.id())
 *             .addressType("INTERNAL")
 *             .build());
 *         var instance = new Instance("instance", InstanceArgs.builder()
 *             .name("router-appliance")
 *             .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", HubArgs.builder()
 *             .name("my-router-hub")
 *             .build());
 *         var spoke = new Spoke("spoke", SpokeArgs.builder()
 *             .name("my-router-spoke")
 *             .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()
 *             .name("my-router-router")
 *             .region(subnetwork.region())
 *             .network(network.selfLink())
 *             .bgp(RouterBgpArgs.builder()
 *                 .asn(64514)
 *                 .build())
 *             .build());
 *         var interfaceRedundant = new RouterInterface("interfaceRedundant", RouterInterfaceArgs.builder()
 *             .name("my-router-intf-red")
 *             .region(router.region())
 *             .router(router.name())
 *             .subnetwork(subnetwork.selfLink())
 *             .privateIpAddress(addrIntfRedundant.address())
 *             .build());
 *         var interface_ = new RouterInterface("interface", RouterInterfaceArgs.builder()
 *             .name("my-router-intf")
 *             .region(router.region())
 *             .router(router.name())
 *             .subnetwork(subnetwork.selfLink())
 *             .privateIpAddress(addrIntf.address())
 *             .redundantInterface(interfaceRedundant.name())
 *             .build());
 *         var peer = new RouterPeer("peer", RouterPeerArgs.builder()
 *             .name("my-router-peer")
 *             .router(router.name())
 *             .region(router.region())
 *             .interface_(interface_.name())
 *             .routerApplianceInstance(instance.selfLink())
 *             .peerAsn(65513)
 *             .peerIpAddress(addrPeer.address())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   network:
 *     type: gcp:compute:Network
 *     properties:
 *       name: my-router-net
 *       autoCreateSubnetworks: false
 *   subnetwork:
 *     type: gcp:compute:Subnetwork
 *     properties:
 *       name: my-router-sub
 *       network: ${network.selfLink}
 *       ipCidrRange: 10.0.0.0/16
 *       region: us-central1
 *   addrIntf:
 *     type: gcp:compute:Address
 *     name: addr_intf
 *     properties:
 *       name: my-router-addr-intf
 *       region: ${subnetwork.region}
 *       subnetwork: ${subnetwork.id}
 *       addressType: INTERNAL
 *   addrIntfRedundant:
 *     type: gcp:compute:Address
 *     name: addr_intf_redundant
 *     properties:
 *       name: my-router-addr-intf-red
 *       region: ${subnetwork.region}
 *       subnetwork: ${subnetwork.id}
 *       addressType: INTERNAL
 *   addrPeer:
 *     type: gcp:compute:Address
 *     name: addr_peer
 *     properties:
 *       name: my-router-addr-peer
 *       region: ${subnetwork.region}
 *       subnetwork: ${subnetwork.id}
 *       addressType: INTERNAL
 *   instance:
 *     type: gcp:compute:Instance
 *     properties:
 *       name: router-appliance
 *       zone: us-central1-a
 *       machineType: e2-medium
 *       canIpForward: true
 *       bootDisk:
 *         initializeParams:
 *           image: debian-cloud/debian-11
 *       networkInterfaces:
 *         - networkIp: ${addrPeer.address}
 *           subnetwork: ${subnetwork.selfLink}
 *   hub:
 *     type: gcp:networkconnectivity:Hub
 *     properties:
 *       name: my-router-hub
 *   spoke:
 *     type: gcp:networkconnectivity:Spoke
 *     properties:
 *       name: my-router-spoke
 *       location: ${subnetwork.region}
 *       hub: ${hub.id}
 *       linkedRouterApplianceInstances:
 *         instances:
 *           - virtualMachine: ${instance.selfLink}
 *             ipAddress: ${addrPeer.address}
 *         siteToSiteDataTransfer: false
 *   router:
 *     type: gcp:compute:Router
 *     properties:
 *       name: my-router-router
 *       region: ${subnetwork.region}
 *       network: ${network.selfLink}
 *       bgp:
 *         asn: 64514
 *   interfaceRedundant:
 *     type: gcp:compute:RouterInterface
 *     name: interface_redundant
 *     properties:
 *       name: my-router-intf-red
 *       region: ${router.region}
 *       router: ${router.name}
 *       subnetwork: ${subnetwork.selfLink}
 *       privateIpAddress: ${addrIntfRedundant.address}
 *   interface:
 *     type: gcp:compute:RouterInterface
 *     properties:
 *       name: my-router-intf
 *       region: ${router.region}
 *       router: ${router.name}
 *       subnetwork: ${subnetwork.selfLink}
 *       privateIpAddress: ${addrIntf.address}
 *       redundantInterface: ${interfaceRedundant.name}
 *   peer:
 *     type: gcp:compute:RouterPeer
 *     properties:
 *       name: my-router-peer
 *       router: ${router.name}
 *       region: ${router.region}
 *       interface: ${interface.name}
 *       routerApplianceInstance: ${instance.selfLink}
 *       peerAsn: 65513
 *       peerIpAddress: ${addrPeer.address}
 * ```
 * 
 * ### Router Peer Md5 Authentication Key
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const foobar = new gcp.compute.RouterPeer("foobar", {
 *     name: "%s-peer",
 *     router: foobarGoogleComputeRouter.name,
 *     region: foobarGoogleComputeRouter.region,
 *     peerAsn: 65515,
 *     advertisedRoutePriority: 100,
 *     "interface": foobarGoogleComputeRouterInterface.name,
 *     peerIpAddress: "169.254.3.2",
 *     md5AuthenticationKey: {
 *         name: "%s-peer-key",
 *         key: "%s-peer-key-value",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * foobar = gcp.compute.RouterPeer("foobar",
 *     name="%s-peer",
 *     router=foobar_google_compute_router["name"],
 *     region=foobar_google_compute_router["region"],
 *     peer_asn=65515,
 *     advertised_route_priority=100,
 *     interface=foobar_google_compute_router_interface["name"],
 *     peer_ip_address="169.254.3.2",
 *     md5_authentication_key=gcp.compute.RouterPeerMd5AuthenticationKeyArgs(
 *         name="%s-peer-key",
 *         key="%s-peer-key-value",
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foobar = new Gcp.Compute.RouterPeer("foobar", new()
 *     {
 *         Name = "%s-peer",
 *         Router = foobarGoogleComputeRouter.Name,
 *         Region = foobarGoogleComputeRouter.Region,
 *         PeerAsn = 65515,
 *         AdvertisedRoutePriority = 100,
 *         Interface = foobarGoogleComputeRouterInterface.Name,
 *         PeerIpAddress = "169.254.3.2",
 *         Md5AuthenticationKey = new Gcp.Compute.Inputs.RouterPeerMd5AuthenticationKeyArgs
 *         {
 *             Name = "%s-peer-key",
 *             Key = "%s-peer-key-value",
 *         },
 *     });
 * });
 * ```
 * ```go
 * 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.NewRouterPeer(ctx, "foobar", &compute.RouterPeerArgs{
 * 			Name:                    pulumi.String("%s-peer"),
 * 			Router:                  pulumi.Any(foobarGoogleComputeRouter.Name),
 * 			Region:                  pulumi.Any(foobarGoogleComputeRouter.Region),
 * 			PeerAsn:                 pulumi.Int(65515),
 * 			AdvertisedRoutePriority: pulumi.Int(100),
 * 			Interface:               pulumi.Any(foobarGoogleComputeRouterInterface.Name),
 * 			PeerIpAddress:           pulumi.String("169.254.3.2"),
 * 			Md5AuthenticationKey: &compute.RouterPeerMd5AuthenticationKeyArgs{
 * 				Name: pulumi.String("%s-peer-key"),
 * 				Key:  pulumi.String("%s-peer-key-value"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.RouterPeerMd5AuthenticationKeyArgs;
 * 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 RouterPeer("foobar", RouterPeerArgs.builder()
 *             .name("%s-peer")
 *             .router(foobarGoogleComputeRouter.name())
 *             .region(foobarGoogleComputeRouter.region())
 *             .peerAsn(65515)
 *             .advertisedRoutePriority(100)
 *             .interface_(foobarGoogleComputeRouterInterface.name())
 *             .peerIpAddress("169.254.3.2")
 *             .md5AuthenticationKey(RouterPeerMd5AuthenticationKeyArgs.builder()
 *                 .name("%s-peer-key")
 *                 .key("%s-peer-key-value")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foobar:
 *     type: gcp:compute:RouterPeer
 *     properties:
 *       name: '%s-peer'
 *       router: ${foobarGoogleComputeRouter.name}
 *       region: ${foobarGoogleComputeRouter.region}
 *       peerAsn: 65515
 *       advertisedRoutePriority: 100
 *       interface: ${foobarGoogleComputeRouterInterface.name}
 *       peerIpAddress: 169.254.3.2
 *       md5AuthenticationKey:
 *         name: '%s-peer-key'
 *         key: '%s-peer-key-value'
 * ```
 * 
 * ## Import
 * RouterBgpPeer can be imported using any of these accepted formats:
 * * `projects/{{project}}/regions/{{region}}/routers/{{router}}/{{name}}`
 * * `{{project}}/{{region}}/{{router}}/{{name}}`
 * * `{{region}}/{{router}}/{{name}}`
 * * `{{router}}/{{name}}`
 * When using the `pulumi import` command, RouterBgpPeer can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/routerPeer:RouterPeer default projects/{{project}}/regions/{{region}}/routers/{{router}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/routerPeer:RouterPeer default {{project}}/{{region}}/{{router}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/routerPeer:RouterPeer default {{region}}/{{router}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/routerPeer:RouterPeer default {{router}}/{{name}}
 * ```
 */
public class RouterPeer internal constructor(
    override val javaResource: com.pulumi.gcp.compute.RouterPeer,
) : KotlinCustomResource(javaResource, RouterPeerMapper) {
    /**
     * 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`.
     */
    public val advertiseMode: Output?
        get() = javaResource.advertiseMode().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * User-specified list of prefix groups to advertise in custom
     * mode, which currently supports the following option:
     * * `ALL_SUBNETS`: Advertises all of the router's own VPC subnets.
     * This excludes any routes learned for subnets that use VPC Network
     * Peering.
     * Note that this field can only be populated if advertiseMode is `CUSTOM`
     * and overrides the list defined for the router (in the "bgp" message).
     * These groups are advertised in addition to any specified prefixes.
     * Leave this field blank to advertise no custom groups.
     */
    public val advertisedGroups: Output>?
        get() = javaResource.advertisedGroups().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * 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.
     */
    public val advertisedIpRanges: Output>?
        get() = javaResource.advertisedIpRanges().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        routerPeerAdvertisedIpRangeToKotlin(args0)
                    })
                })
            }).orElse(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.
     */
    public val advertisedRoutePriority: Output?
        get() = javaResource.advertisedRoutePriority().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * BFD configuration for the BGP peering.
     * Structure is documented below.
     */
    public val bfd: Output
        get() = javaResource.bfd().applyValue({ args0 ->
            args0.let({ args0 ->
                routerPeerBfdToKotlin(args0)
            })
        })

    /**
     * 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.
     */
    public val enable: Output?
        get() = javaResource.enable().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4.
     */
    public val enableIpv4: Output
        get() = javaResource.enableIpv4().applyValue({ args0 -> args0 })

    /**
     * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
     */
    public val enableIpv6: Output?
        get() = javaResource.enableIpv6().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Name of the interface the BGP peer is associated with.
     */
    public val `interface`: Output
        get() = javaResource.interface_().applyValue({ args0 -> args0 })

    /**
     * IP address of the interface inside Google Cloud Platform.
     * Only IPv4 is supported.
     */
    public val ipAddress: Output
        get() = javaResource.ipAddress().applyValue({ args0 -> args0 })

    /**
     * IPv4 address of the interface inside Google Cloud Platform.
     */
    public val ipv4NexthopAddress: Output
        get() = javaResource.ipv4NexthopAddress().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val ipv6NexthopAddress: Output
        get() = javaResource.ipv6NexthopAddress().applyValue({ args0 -> args0 })

    /**
     * The resource that configures and manages this BGP peer.
     * * `MANAGED_BY_USER` is the default value and can be managed by
     * you or other users
     * * `MANAGED_BY_ATTACHMENT` is a BGP peer that is configured and
     * managed by Cloud Interconnect, specifically by an
     * InterconnectAttachment of type PARTNER. Google automatically
     * creates, updates, and deletes this type of BGP peer when the
     * PARTNER InterconnectAttachment is created, updated,
     * or deleted.
     */
    public val managementType: Output
        get() = javaResource.managementType().applyValue({ args0 -> args0 })

    /**
     * Configuration for MD5 authentication on the BGP session.
     * Structure is documented below.
     */
    public val md5AuthenticationKey: Output?
        get() = javaResource.md5AuthenticationKey().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> routerPeerMd5AuthenticationKeyToKotlin(args0) })
            }).orElse(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.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Peer BGP Autonomous System Number (ASN).
     * Each BGP interface may use a different value.
     */
    public val peerAsn: Output
        get() = javaResource.peerAsn().applyValue({ args0 -> args0 })

    /**
     * IP address of the BGP interface outside Google Cloud Platform.
     * Only IPv4 is supported. Required if `ip_address` is set.
     */
    public val peerIpAddress: Output
        get() = javaResource.peerIpAddress().applyValue({ args0 -> args0 })

    /**
     * IPv4 address of the BGP interface outside Google Cloud Platform.
     */
    public val peerIpv4NexthopAddress: Output
        get() = javaResource.peerIpv4NexthopAddress().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val peerIpv6NexthopAddress: Output
        get() = javaResource.peerIpv6NexthopAddress().applyValue({ args0 -> args0 })

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * Region where the router and BgpPeer reside.
     * If it is not provided, the provider region is used.
     */
    public val region: Output
        get() = javaResource.region().applyValue({ args0 -> args0 })

    /**
     * The name of the Cloud Router in which this BgpPeer will be configured.
     * - - -
     */
    public val router: Output
        get() = javaResource.router().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val routerApplianceInstance: Output?
        get() = javaResource.routerApplianceInstance().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object RouterPeerMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.compute.RouterPeer::class == javaResource::class

    override fun map(javaResource: Resource): RouterPeer = RouterPeer(
        javaResource as
            com.pulumi.gcp.compute.RouterPeer,
    )
}

/**
 * @see [RouterPeer].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [RouterPeer].
 */
public suspend fun routerPeer(name: String, block: suspend RouterPeerResourceBuilder.() -> Unit): RouterPeer {
    val builder = RouterPeerResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [RouterPeer].
 * @param name The _unique_ name of the resulting resource.
 */
public fun routerPeer(name: String): RouterPeer {
    val builder = RouterPeerResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy