import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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", * }); * ``` * ### 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, * }); * ``` * ### 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", * }, * }); * ``` * ### Router Zero Custom Learend Route Priority * * ```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", * "interface": "interface-1", * peerAsn: 65513, * customLearnedRoutePriority: 0, * zeroCustomLearnedRoutePriority: true, * }); * ``` * ### Router Zero Advertised Route Priority * * ```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", * "interface": "interface-1", * peerAsn: 65513, * advertisedRoutePriority: 0, * zeroAdvertisedRoutePriority: true, * }); * ``` * ### 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, * }); * ``` * * ### 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", * }, * }); * ``` * * ### Router Peer Export And Import Policies * * ```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-subnet", * network: network.selfLink, * ipCidrRange: "10.0.0.0/16", * region: "us-central1", * }); * const address = new gcp.compute.Address("address", { * name: "my-router", * region: subnetwork.region, * }); * const vpnGateway = new gcp.compute.HaVpnGateway("vpn_gateway", { * name: "my-router-gateway", * network: network.selfLink, * region: subnetwork.region, * }); * const externalGateway = new gcp.compute.ExternalVpnGateway("external_gateway", { * name: "my-router-external-gateway", * redundancyType: "SINGLE_IP_INTERNALLY_REDUNDANT", * description: "An externally managed VPN gateway", * interfaces: [{ * id: 0, * ipAddress: "8.8.8.8", * }], * }); * const router = new gcp.compute.Router("router", { * name: "my-router", * region: subnetwork.region, * network: network.selfLink, * bgp: { * asn: 64514, * }, * }); * const vpnTunnel = new gcp.compute.VPNTunnel("vpn_tunnel", { * name: "my-router", * region: subnetwork.region, * vpnGateway: vpnGateway.id, * peerExternalGateway: externalGateway.id, * peerExternalGatewayInterface: 0, * sharedSecret: "unguessable", * router: router.name, * vpnGatewayInterface: 0, * }); * const routerInterface = new gcp.compute.RouterInterface("router_interface", { * name: "my-router", * router: router.name, * region: router.region, * vpnTunnel: vpnTunnel.name, * }); * const rp_export = new gcp.compute.RouterRoutePolicy("rp-export", { * name: "my-router-rp-export", * router: router.name, * region: router.region, * type: "ROUTE_POLICY_TYPE_EXPORT", * terms: [{ * priority: 2, * match: { * expression: "destination == '10.0.0.0/12'", * title: "export_expression", * description: "acceptance expression for export", * }, * actions: [{ * expression: "accept()", * }], * }], * }, { * dependsOn: [routerInterface], * }); * const rp_import = new gcp.compute.RouterRoutePolicy("rp-import", { * name: "my-router-rp-import", * router: router.name, * region: router.region, * type: "ROUTE_POLICY_TYPE_IMPORT", * terms: [{ * priority: 1, * match: { * expression: "destination == '10.0.0.0/12'", * title: "import_expression", * description: "acceptance expression for import", * }, * actions: [{ * expression: "accept()", * }], * }], * }, { * dependsOn: [ * routerInterface, * rp_export, * ], * }); * const routerPeer = new gcp.compute.RouterPeer("router_peer", { * name: "my-router-peer", * router: router.name, * region: router.region, * peerAsn: 65515, * advertisedRoutePriority: 100, * "interface": routerInterface.name, * md5AuthenticationKey: { * name: "my-router-peer-key", * key: "my-router-peer-key-value", * }, * importPolicies: [rp_import.name], * exportPolicies: [rp_export.name], * }, { * dependsOn: [ * rp_export, * rp_import, * routerInterface, * ], * }); * ``` * * ## 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}} * ``` */ export declare class RouterPeer extends pulumi.CustomResource { /** * Get an existing RouterPeer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RouterPeerState, opts?: pulumi.CustomResourceOptions): RouterPeer; /** * Returns true if the given object is an instance of RouterPeer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RouterPeer; /** * 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`. */ readonly advertiseMode: pulumi.Output; /** * 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. */ readonly advertisedGroups: pulumi.Output; /** * 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. */ readonly advertisedIpRanges: pulumi.Output; /** * 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. */ readonly advertisedRoutePriority: pulumi.Output; /** * BFD configuration for the BGP peering. * Structure is documented below. */ readonly bfd: pulumi.Output; /** * The custom learned route IP address range. Must be a valid CIDR-formatted prefix. * If an IP address is provided without a subnet mask, it is interpreted as, for IPv4, * a /32 singular IP address range, and, for IPv6, /128. * Structure is documented below. */ readonly customLearnedIpRanges: pulumi.Output; /** * The user-defined custom learned route priority for a BGP session. * This value is applied to all custom learned route ranges for the session. * You can choose a value from 0 to 65335. If you don't provide a value, * Google Cloud assigns a priority of 100 to the ranges. */ readonly customLearnedRoutePriority: pulumi.Output; /** * 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. */ readonly enable: pulumi.Output; /** * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. */ readonly enableIpv4: pulumi.Output; /** * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. */ readonly enableIpv6: pulumi.Output; /** * routers.list of export policies applied to this peer, in the order they must be evaluated. * The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. */ readonly exportPolicies: pulumi.Output; /** * routers.list of import policies applied to this peer, in the order they must be evaluated. * The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. */ readonly importPolicies: pulumi.Output; /** * Name of the interface the BGP peer is associated with. */ readonly interface: pulumi.Output; /** * IP address of the interface inside Google Cloud Platform. * Only IPv4 is supported. */ readonly ipAddress: pulumi.Output; /** * IPv4 address of the interface inside Google Cloud Platform. */ readonly ipv4NexthopAddress: pulumi.Output; /** * 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. */ readonly ipv6NexthopAddress: pulumi.Output; /** * An internal boolean field for provider use for zero_advertised_route_priority. */ readonly isAdvertisedRoutePrioritySet: pulumi.Output; /** * An internal boolean field for provider use. */ readonly isCustomLearnedPrioritySet: pulumi.Output; /** * 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. */ readonly managementType: pulumi.Output; /** * Configuration for MD5 authentication on the BGP session. * Structure is documented below. */ readonly md5AuthenticationKey: pulumi.Output; /** * 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. */ readonly name: pulumi.Output; /** * Peer BGP Autonomous System Number (ASN). * Each BGP interface may use a different value. */ readonly peerAsn: pulumi.Output; /** * IP address of the BGP interface outside Google Cloud Platform. * Only IPv4 is supported. Required if `ipAddress` is set. */ readonly peerIpAddress: pulumi.Output; /** * IPv4 address of the BGP interface outside Google Cloud Platform. */ readonly peerIpv4NexthopAddress: pulumi.Output; /** * 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. */ readonly peerIpv6NexthopAddress: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Region where the router and BgpPeer reside. * If it is not provided, the provider region is used. */ readonly region: pulumi.Output; /** * The name of the Cloud Router in which this BgpPeer will be configured. * * * - - - */ readonly router: pulumi.Output; /** * 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. */ readonly routerApplianceInstance: pulumi.Output; /** * The user-defined zero-advertised-route-priority for a advertised-route-priority in BGP session. * This value has to be set true to force the advertisedRoutePriority to be 0. */ readonly zeroAdvertisedRoutePriority: pulumi.Output; /** * The user-defined zero-custom-learned-route-priority for a custom-learned-route-priority in BGP session. * This value has to be set true to force the customLearnedRoutePriority to be 0. */ readonly zeroCustomLearnedRoutePriority: pulumi.Output; /** * Create a RouterPeer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RouterPeerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RouterPeer resources. */ export interface RouterPeerState { /** * 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`. */ advertiseMode?: pulumi.Input; /** * 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. */ advertisedGroups?: pulumi.Input[]>; /** * 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. */ advertisedIpRanges?: pulumi.Input[]>; /** * 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. */ advertisedRoutePriority?: pulumi.Input; /** * BFD configuration for the BGP peering. * Structure is documented below. */ bfd?: pulumi.Input; /** * The custom learned route IP address range. Must be a valid CIDR-formatted prefix. * If an IP address is provided without a subnet mask, it is interpreted as, for IPv4, * a /32 singular IP address range, and, for IPv6, /128. * Structure is documented below. */ customLearnedIpRanges?: pulumi.Input[]>; /** * The user-defined custom learned route priority for a BGP session. * This value is applied to all custom learned route ranges for the session. * You can choose a value from 0 to 65335. If you don't provide a value, * Google Cloud assigns a priority of 100 to the ranges. */ customLearnedRoutePriority?: pulumi.Input; /** * 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. */ enable?: pulumi.Input; /** * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. */ enableIpv4?: pulumi.Input; /** * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. */ enableIpv6?: pulumi.Input; /** * routers.list of export policies applied to this peer, in the order they must be evaluated. * The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. */ exportPolicies?: pulumi.Input[]>; /** * routers.list of import policies applied to this peer, in the order they must be evaluated. * The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. */ importPolicies?: pulumi.Input[]>; /** * Name of the interface the BGP peer is associated with. */ interface?: pulumi.Input; /** * IP address of the interface inside Google Cloud Platform. * Only IPv4 is supported. */ ipAddress?: pulumi.Input; /** * IPv4 address of the interface inside Google Cloud Platform. */ ipv4NexthopAddress?: pulumi.Input; /** * 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. */ ipv6NexthopAddress?: pulumi.Input; /** * An internal boolean field for provider use for zero_advertised_route_priority. */ isAdvertisedRoutePrioritySet?: pulumi.Input; /** * An internal boolean field for provider use. */ isCustomLearnedPrioritySet?: pulumi.Input; /** * 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. */ managementType?: pulumi.Input; /** * Configuration for MD5 authentication on the BGP session. * Structure is documented below. */ md5AuthenticationKey?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * Peer BGP Autonomous System Number (ASN). * Each BGP interface may use a different value. */ peerAsn?: pulumi.Input; /** * IP address of the BGP interface outside Google Cloud Platform. * Only IPv4 is supported. Required if `ipAddress` is set. */ peerIpAddress?: pulumi.Input; /** * IPv4 address of the BGP interface outside Google Cloud Platform. */ peerIpv4NexthopAddress?: pulumi.Input; /** * 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. */ peerIpv6NexthopAddress?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Region where the router and BgpPeer reside. * If it is not provided, the provider region is used. */ region?: pulumi.Input; /** * The name of the Cloud Router in which this BgpPeer will be configured. * * * - - - */ router?: pulumi.Input; /** * 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. */ routerApplianceInstance?: pulumi.Input; /** * The user-defined zero-advertised-route-priority for a advertised-route-priority in BGP session. * This value has to be set true to force the advertisedRoutePriority to be 0. */ zeroAdvertisedRoutePriority?: pulumi.Input; /** * The user-defined zero-custom-learned-route-priority for a custom-learned-route-priority in BGP session. * This value has to be set true to force the customLearnedRoutePriority to be 0. */ zeroCustomLearnedRoutePriority?: pulumi.Input; } /** * The set of arguments for constructing a RouterPeer resource. */ export interface RouterPeerArgs { /** * 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`. */ advertiseMode?: pulumi.Input; /** * 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. */ advertisedGroups?: pulumi.Input[]>; /** * 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. */ advertisedIpRanges?: pulumi.Input[]>; /** * 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. */ advertisedRoutePriority?: pulumi.Input; /** * BFD configuration for the BGP peering. * Structure is documented below. */ bfd?: pulumi.Input; /** * The custom learned route IP address range. Must be a valid CIDR-formatted prefix. * If an IP address is provided without a subnet mask, it is interpreted as, for IPv4, * a /32 singular IP address range, and, for IPv6, /128. * Structure is documented below. */ customLearnedIpRanges?: pulumi.Input[]>; /** * The user-defined custom learned route priority for a BGP session. * This value is applied to all custom learned route ranges for the session. * You can choose a value from 0 to 65335. If you don't provide a value, * Google Cloud assigns a priority of 100 to the ranges. */ customLearnedRoutePriority?: pulumi.Input; /** * 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. */ enable?: pulumi.Input; /** * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. */ enableIpv4?: pulumi.Input; /** * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. */ enableIpv6?: pulumi.Input; /** * routers.list of export policies applied to this peer, in the order they must be evaluated. * The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. */ exportPolicies?: pulumi.Input[]>; /** * routers.list of import policies applied to this peer, in the order they must be evaluated. * The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. */ importPolicies?: pulumi.Input[]>; /** * Name of the interface the BGP peer is associated with. */ interface: pulumi.Input; /** * IP address of the interface inside Google Cloud Platform. * Only IPv4 is supported. */ ipAddress?: pulumi.Input; /** * IPv4 address of the interface inside Google Cloud Platform. */ ipv4NexthopAddress?: pulumi.Input; /** * 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. */ ipv6NexthopAddress?: pulumi.Input; /** * Configuration for MD5 authentication on the BGP session. * Structure is documented below. */ md5AuthenticationKey?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * Peer BGP Autonomous System Number (ASN). * Each BGP interface may use a different value. */ peerAsn: pulumi.Input; /** * IP address of the BGP interface outside Google Cloud Platform. * Only IPv4 is supported. Required if `ipAddress` is set. */ peerIpAddress?: pulumi.Input; /** * IPv4 address of the BGP interface outside Google Cloud Platform. */ peerIpv4NexthopAddress?: pulumi.Input; /** * 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. */ peerIpv6NexthopAddress?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Region where the router and BgpPeer reside. * If it is not provided, the provider region is used. */ region?: pulumi.Input; /** * The name of the Cloud Router in which this BgpPeer will be configured. * * * - - - */ router: pulumi.Input; /** * 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. */ routerApplianceInstance?: pulumi.Input; /** * The user-defined zero-advertised-route-priority for a advertised-route-priority in BGP session. * This value has to be set true to force the advertisedRoutePriority to be 0. */ zeroAdvertisedRoutePriority?: pulumi.Input; /** * The user-defined zero-custom-learned-route-priority for a custom-learned-route-priority in BGP session. * This value has to be set true to force the customLearnedRoutePriority to be 0. */ zeroCustomLearnedRoutePriority?: pulumi.Input; }