import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents a Router resource. * * To get more information about Router, 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 Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const foobarNetwork = new gcp.compute.Network("foobar", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const foobar = new gcp.compute.Router("foobar", { * name: "my-router", * network: foobarNetwork.name, * bgp: { * asn: 64514, * advertiseMode: "CUSTOM", * advertisedGroups: ["ALL_SUBNETS"], * advertisedIpRanges: [ * { * range: "1.2.3.4", * }, * { * range: "6.7.0.0/16", * }, * ], * }, * }); * ``` * ### Compute Router Encrypted Interconnect * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const network = new gcp.compute.Network("network", { * name: "test-network", * autoCreateSubnetworks: false, * }); * const encrypted_interconnect_router = new gcp.compute.Router("encrypted-interconnect-router", { * name: "test-router", * network: network.name, * encryptedInterconnectRouter: true, * bgp: { * asn: 64514, * }, * }); * ``` * ### Router Ncc Gw * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const network = new gcp.compute.Network("network", { * name: "net-spoke", * autoCreateSubnetworks: false, * }); * const subnetwork = new gcp.compute.Subnetwork("subnetwork", { * name: "tf-test-subnet_21197", * ipCidrRange: "10.0.0.0/28", * region: "us-central1", * network: network.selfLink, * }); * const basicHub = new gcp.networkconnectivity.Hub("basic_hub", { * name: "hub", * description: "A sample hub", * labels: { * "label-two": "value-one", * }, * presetTopology: "HYBRID_INSPECTION", * }); * const primary = new gcp.networkconnectivity.Spoke("primary", { * name: "my-ncc-gw", * location: "us-central1", * description: "A sample spoke of type Gateway", * labels: { * "label-one": "value-one", * }, * hub: basicHub.id, * gateway: { * ipRangeReservations: [{ * ipRange: "10.0.0.0/23", * }], * capacity: "CAPACITY_1_GBPS", * }, * group: "gateways", * }); * const foobar = new gcp.compute.Router("foobar", { * name: "my-router", * bgp: { * asn: 64514, * advertiseMode: "CUSTOM", * advertisedGroups: ["ALL_SUBNETS"], * advertisedIpRanges: [ * { * range: "1.2.3.4", * }, * { * range: "6.7.0.0/16", * }, * ], * }, * nccGateway: primary.id, * }); * ``` * * ## Import * * Router can be imported using any of these accepted formats: * * * `projects/{{project}}/regions/{{region}}/routers/{{name}}` * * * `{{project}}/{{region}}/{{name}}` * * * `{{region}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, Router can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/router:Router default projects/{{project}}/regions/{{region}}/routers/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/router:Router default {{project}}/{{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/router:Router default {{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/router:Router default {{name}} * ``` */ export declare class Router extends pulumi.CustomResource { /** * Get an existing Router 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?: RouterState, opts?: pulumi.CustomResourceOptions): Router; /** * Returns true if the given object is an instance of Router. 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 Router; /** * BGP information specific to this router. * Structure is documented below. */ readonly bgp: pulumi.Output; /** * Creation timestamp in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output; /** * An optional description of this resource. */ readonly description: pulumi.Output; /** * Indicates if a router is dedicated for use with encrypted VLAN * attachments (interconnectAttachments). */ readonly encryptedInterconnectRouter: pulumi.Output; /** * Keys used for MD5 authentication. * Structure is documented below. */ readonly md5AuthenticationKeys: pulumi.Output; /** * 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. */ readonly name: pulumi.Output; /** * A URI of an NCC Gateway spoke */ readonly nccGateway: pulumi.Output; /** * A reference to the network to which this router belongs. */ readonly network: pulumi.Output; /** * Additional params passed with the request, but not persisted as part of resource payload * Structure is documented below. */ readonly params: 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 resides. */ readonly region: pulumi.Output; /** * The URI of the created resource. */ readonly selfLink: pulumi.Output; /** * Create a Router 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?: RouterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Router resources. */ export interface RouterState { /** * BGP information specific to this router. * Structure is documented below. */ bgp?: pulumi.Input; /** * Creation timestamp in RFC3339 text format. */ creationTimestamp?: pulumi.Input; /** * An optional description of this resource. */ description?: pulumi.Input; /** * Indicates if a router is dedicated for use with encrypted VLAN * attachments (interconnectAttachments). */ encryptedInterconnectRouter?: pulumi.Input; /** * Keys used for MD5 authentication. * Structure is documented below. */ md5AuthenticationKeys?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * A URI of an NCC Gateway spoke */ nccGateway?: pulumi.Input; /** * A reference to the network to which this router belongs. */ network?: pulumi.Input; /** * Additional params passed with the request, but not persisted as part of resource payload * Structure is documented below. */ params?: 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 resides. */ region?: pulumi.Input; /** * The URI of the created resource. */ selfLink?: pulumi.Input; } /** * The set of arguments for constructing a Router resource. */ export interface RouterArgs { /** * BGP information specific to this router. * Structure is documented below. */ bgp?: pulumi.Input; /** * An optional description of this resource. */ description?: pulumi.Input; /** * Indicates if a router is dedicated for use with encrypted VLAN * attachments (interconnectAttachments). */ encryptedInterconnectRouter?: pulumi.Input; /** * Keys used for MD5 authentication. * Structure is documented below. */ md5AuthenticationKeys?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * A URI of an NCC Gateway spoke */ nccGateway?: pulumi.Input; /** * A reference to the network to which this router belongs. */ network?: pulumi.Input; /** * Additional params passed with the request, but not persisted as part of resource payload * Structure is documented below. */ params?: 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 resides. */ region?: pulumi.Input; }