gcp.compute.Router
Explore with Pulumi AI
Represents a Router resource.
To get more information about Router, see:
- API documentation
- How-to Guides
Example Usage
Router Basic
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var foobarNetwork = new Gcp.Compute.Network("foobarNetwork", new()
{
AutoCreateSubnetworks = false,
});
var foobarRouter = new Gcp.Compute.Router("foobarRouter", new()
{
Network = foobarNetwork.Name,
Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
{
Asn = 64514,
AdvertiseMode = "CUSTOM",
AdvertisedGroups = new[]
{
"ALL_SUBNETS",
},
AdvertisedIpRanges = new[]
{
new Gcp.Compute.Inputs.RouterBgpAdvertisedIpRangeArgs
{
Range = "1.2.3.4",
},
new Gcp.Compute.Inputs.RouterBgpAdvertisedIpRangeArgs
{
Range = "6.7.0.0/16",
},
},
},
});
});
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 {
foobarNetwork, err := compute.NewNetwork(ctx, "foobarNetwork", &compute.NetworkArgs{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewRouter(ctx, "foobarRouter", &compute.RouterArgs{
Network: foobarNetwork.Name,
Bgp: &compute.RouterBgpArgs{
Asn: pulumi.Int(64514),
AdvertiseMode: pulumi.String("CUSTOM"),
AdvertisedGroups: pulumi.StringArray{
pulumi.String("ALL_SUBNETS"),
},
AdvertisedIpRanges: compute.RouterBgpAdvertisedIpRangeArray{
&compute.RouterBgpAdvertisedIpRangeArgs{
Range: pulumi.String("1.2.3.4"),
},
&compute.RouterBgpAdvertisedIpRangeArgs{
Range: pulumi.String("6.7.0.0/16"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Router;
import com.pulumi.gcp.compute.RouterArgs;
import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foobarNetwork = new Network("foobarNetwork", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var foobarRouter = new Router("foobarRouter", RouterArgs.builder()
.network(foobarNetwork.name())
.bgp(RouterBgpArgs.builder()
.asn(64514)
.advertiseMode("CUSTOM")
.advertisedGroups("ALL_SUBNETS")
.advertisedIpRanges(
RouterBgpAdvertisedIpRangeArgs.builder()
.range("1.2.3.4")
.build(),
RouterBgpAdvertisedIpRangeArgs.builder()
.range("6.7.0.0/16")
.build())
.build())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
foobar_network = gcp.compute.Network("foobarNetwork", auto_create_subnetworks=False)
foobar_router = gcp.compute.Router("foobarRouter",
network=foobar_network.name,
bgp=gcp.compute.RouterBgpArgs(
asn=64514,
advertise_mode="CUSTOM",
advertised_groups=["ALL_SUBNETS"],
advertised_ip_ranges=[
gcp.compute.RouterBgpAdvertisedIpRangeArgs(
range="1.2.3.4",
),
gcp.compute.RouterBgpAdvertisedIpRangeArgs(
range="6.7.0.0/16",
),
],
))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foobarNetwork = new gcp.compute.Network("foobarNetwork", {autoCreateSubnetworks: false});
const foobarRouter = new gcp.compute.Router("foobarRouter", {
network: foobarNetwork.name,
bgp: {
asn: 64514,
advertiseMode: "CUSTOM",
advertisedGroups: ["ALL_SUBNETS"],
advertisedIpRanges: [
{
range: "1.2.3.4",
},
{
range: "6.7.0.0/16",
},
],
},
});
resources:
foobarRouter:
type: gcp:compute:Router
properties:
network: ${foobarNetwork.name}
bgp:
asn: 64514
advertiseMode: CUSTOM
advertisedGroups:
- ALL_SUBNETS
advertisedIpRanges:
- range: 1.2.3.4
- range: 6.7.0.0/16
foobarNetwork:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
Compute Router Encrypted Interconnect
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()
{
AutoCreateSubnetworks = false,
});
var encrypted_interconnect_router = new Gcp.Compute.Router("encrypted-interconnect-router", new()
{
Network = network.Name,
EncryptedInterconnectRouter = true,
Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
{
Asn = 64514,
},
});
});
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 {
network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewRouter(ctx, "encrypted-interconnect-router", &compute.RouterArgs{
Network: network.Name,
EncryptedInterconnectRouter: pulumi.Bool(true),
Bgp: &compute.RouterBgpArgs{
Asn: pulumi.Int(64514),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Router;
import com.pulumi.gcp.compute.RouterArgs;
import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var network = new Network("network", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var encrypted_interconnect_router = new Router("encrypted-interconnect-router", RouterArgs.builder()
.network(network.name())
.encryptedInterconnectRouter(true)
.bgp(RouterBgpArgs.builder()
.asn(64514)
.build())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
network = gcp.compute.Network("network", auto_create_subnetworks=False)
encrypted_interconnect_router = gcp.compute.Router("encrypted-interconnect-router",
network=network.name,
encrypted_interconnect_router=True,
bgp=gcp.compute.RouterBgpArgs(
asn=64514,
))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const network = new gcp.compute.Network("network", {autoCreateSubnetworks: false});
const encrypted_interconnect_router = new gcp.compute.Router("encrypted-interconnect-router", {
network: network.name,
encryptedInterconnectRouter: true,
bgp: {
asn: 64514,
},
});
resources:
encrypted-interconnect-router:
type: gcp:compute:Router
properties:
network: ${network.name}
encryptedInterconnectRouter: true
bgp:
asn: 64514
network:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
Create Router Resource
new Router(name: string, args: RouterArgs, opts?: CustomResourceOptions);
@overload
def Router(resource_name: str,
opts: Optional[ResourceOptions] = None,
bgp: Optional[RouterBgpArgs] = None,
description: Optional[str] = None,
encrypted_interconnect_router: Optional[bool] = None,
name: Optional[str] = None,
network: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None)
@overload
def Router(resource_name: str,
args: RouterArgs,
opts: Optional[ResourceOptions] = None)
func NewRouter(ctx *Context, name string, args RouterArgs, opts ...ResourceOption) (*Router, error)
public Router(string name, RouterArgs args, CustomResourceOptions? opts = null)
public Router(String name, RouterArgs args)
public Router(String name, RouterArgs args, CustomResourceOptions options)
type: gcp:compute:Router
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Router Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Router resource accepts the following input properties:
- Network string
A reference to the network to which this router belongs.
- Bgp
Router
Bgp BGP information specific to this router. Structure is documented below.
- Description string
An optional description of this resource.
- Encrypted
Interconnect boolRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- Name string
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
Region where the router resides.
- Network string
A reference to the network to which this router belongs.
- Bgp
Router
Bgp Args BGP information specific to this router. Structure is documented below.
- Description string
An optional description of this resource.
- Encrypted
Interconnect boolRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- Name string
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
Region where the router resides.
- network String
A reference to the network to which this router belongs.
- bgp
Router
Bgp BGP information specific to this router. Structure is documented below.
- description String
An optional description of this resource.
- encrypted
Interconnect BooleanRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name String
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
Region where the router resides.
- network string
A reference to the network to which this router belongs.
- bgp
Router
Bgp BGP information specific to this router. Structure is documented below.
- description string
An optional description of this resource.
- encrypted
Interconnect booleanRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name string
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
Region where the router resides.
- network str
A reference to the network to which this router belongs.
- bgp
Router
Bgp Args BGP information specific to this router. Structure is documented below.
- description str
An optional description of this resource.
- encrypted_
interconnect_ boolrouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name str
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
Region where the router resides.
- network String
A reference to the network to which this router belongs.
- bgp Property Map
BGP information specific to this router. Structure is documented below.
- description String
An optional description of this resource.
- encrypted
Interconnect BooleanRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name String
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
Region where the router resides.
Outputs
All input properties are implicitly available as output properties. Additionally, the Router resource produces the following output properties:
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Id string
The provider-assigned unique ID for this managed resource.
- Self
Link string The URI of the created resource.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Id string
The provider-assigned unique ID for this managed resource.
- Self
Link string The URI of the created resource.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- id String
The provider-assigned unique ID for this managed resource.
- self
Link String The URI of the created resource.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- id string
The provider-assigned unique ID for this managed resource.
- self
Link string The URI of the created resource.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- id str
The provider-assigned unique ID for this managed resource.
- self_
link str The URI of the created resource.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- id String
The provider-assigned unique ID for this managed resource.
- self
Link String The URI of the created resource.
Look up Existing Router Resource
Get an existing Router resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RouterState, opts?: CustomResourceOptions): Router
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bgp: Optional[RouterBgpArgs] = None,
creation_timestamp: Optional[str] = None,
description: Optional[str] = None,
encrypted_interconnect_router: Optional[bool] = None,
name: Optional[str] = None,
network: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
self_link: Optional[str] = None) -> Router
func GetRouter(ctx *Context, name string, id IDInput, state *RouterState, opts ...ResourceOption) (*Router, error)
public static Router Get(string name, Input<string> id, RouterState? state, CustomResourceOptions? opts = null)
public static Router get(String name, Output<String> id, RouterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bgp
Router
Bgp BGP information specific to this router. Structure is documented below.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
An optional description of this resource.
- Encrypted
Interconnect boolRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- Name string
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- Network string
A reference to the network to which this router belongs.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
Region where the router resides.
- Self
Link string The URI of the created resource.
- Bgp
Router
Bgp Args BGP information specific to this router. Structure is documented below.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
An optional description of this resource.
- Encrypted
Interconnect boolRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- Name string
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- Network string
A reference to the network to which this router belongs.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
Region where the router resides.
- Self
Link string The URI of the created resource.
- bgp
Router
Bgp BGP information specific to this router. Structure is documented below.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- description String
An optional description of this resource.
- encrypted
Interconnect BooleanRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name String
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- network String
A reference to the network to which this router belongs.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
Region where the router resides.
- self
Link String The URI of the created resource.
- bgp
Router
Bgp BGP information specific to this router. Structure is documented below.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- description string
An optional description of this resource.
- encrypted
Interconnect booleanRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name string
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- network string
A reference to the network to which this router belongs.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
Region where the router resides.
- self
Link string The URI of the created resource.
- bgp
Router
Bgp Args BGP information specific to this router. Structure is documented below.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- description str
An optional description of this resource.
- encrypted_
interconnect_ boolrouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name str
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- network str
A reference to the network to which this router belongs.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
Region where the router resides.
- self_
link str The URI of the created resource.
- bgp Property Map
BGP information specific to this router. Structure is documented below.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- description String
An optional description of this resource.
- encrypted
Interconnect BooleanRouter Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).
- name String
Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression
a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.- network String
A reference to the network to which this router belongs.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
Region where the router resides.
- self
Link String The URI of the created resource.
Supporting Types
RouterBgp, RouterBgpArgs
- Asn int
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
- Advertise
Mode string User-specified flag to indicate which mode to use for advertisement. Default value is
DEFAULT
. Possible values are:DEFAULT
,CUSTOM
.- Advertised
Groups List<string> User-specified list of prefix groups 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 groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS
- Advertised
Ip List<RouterRanges Bgp Advertised Ip Range> 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.
- Keepalive
Interval int The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
- Asn int
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
- Advertise
Mode string User-specified flag to indicate which mode to use for advertisement. Default value is
DEFAULT
. Possible values are:DEFAULT
,CUSTOM
.- Advertised
Groups []string User-specified list of prefix groups 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 groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS
- Advertised
Ip []RouterRanges Bgp Advertised Ip Range 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.
- Keepalive
Interval int The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
- asn Integer
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
- advertise
Mode String User-specified flag to indicate which mode to use for advertisement. Default value is
DEFAULT
. Possible values are:DEFAULT
,CUSTOM
.- advertised
Groups List<String> User-specified list of prefix groups 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 groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS
- advertised
Ip List<RouterRanges Bgp Advertised Ip Range> 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.
- keepalive
Interval Integer The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
- asn number
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
- advertise
Mode string User-specified flag to indicate which mode to use for advertisement. Default value is
DEFAULT
. Possible values are:DEFAULT
,CUSTOM
.- advertised
Groups string[] User-specified list of prefix groups 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 groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS
- advertised
Ip RouterRanges Bgp Advertised Ip Range[] 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.
- keepalive
Interval number The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
- asn int
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
- advertise_
mode str User-specified flag to indicate which mode to use for advertisement. Default value is
DEFAULT
. Possible values are:DEFAULT
,CUSTOM
.- advertised_
groups Sequence[str] User-specified list of prefix groups 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 groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS
- advertised_
ip_ Sequence[Routerranges Bgp Advertised Ip Range] 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.
- keepalive_
interval int The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
- asn Number
Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.
- advertise
Mode String User-specified flag to indicate which mode to use for advertisement. Default value is
DEFAULT
. Possible values are:DEFAULT
,CUSTOM
.- advertised
Groups List<String> User-specified list of prefix groups 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 groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL_SUBNETS
- advertised
Ip List<Property Map>Ranges 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.
- keepalive
Interval Number The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20.
RouterBgpAdvertisedIpRange, RouterBgpAdvertisedIpRangeArgs
- Range string
The IP range to advertise. The value must be a CIDR-formatted string.
- Description string
User-specified description for the IP range.
- Range string
The IP range to advertise. The value must be a CIDR-formatted string.
- Description string
User-specified description for the IP range.
- range String
The IP range to advertise. The value must be a CIDR-formatted string.
- description String
User-specified description for the IP range.
- range string
The IP range to advertise. The value must be a CIDR-formatted string.
- description string
User-specified description for the IP range.
- range str
The IP range to advertise. The value must be a CIDR-formatted string.
- description str
User-specified description for the IP range.
- range String
The IP range to advertise. The value must be a CIDR-formatted string.
- description String
User-specified description for the IP range.
Import
Router can be imported using any of these accepted formats* projects/{{project}}/regions/{{region}}/routers/{{name}}
* {{project}}/{{region}}/{{name}}
* {{region}}/{{name}}
* {{name}}
In Terraform v1.5.0 and later, use an import
block to import Router using one of the formats above. For exampletf import {
id = “projects/{{project}}/regions/{{region}}/routers/{{name}}”
to = google_compute_router.default }
$ pulumi import gcp:compute/router:Router When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Router can be imported using one of the formats above. For example
$ pulumi import gcp:compute/router:Router default projects/{{project}}/regions/{{region}}/routers/{{name}}
$ pulumi import gcp:compute/router:Router default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/router:Router default {{region}}/{{name}}
$ pulumi import gcp:compute/router:Router default {{name}}
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.