@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
282 lines (281 loc) • 9.49 kB
TypeScript
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,
* },
* });
* ```
*
* ## 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<pulumi.ID>, 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<outputs.compute.RouterBgp | undefined>;
/**
* Creation timestamp in RFC3339 text format.
*/
readonly creationTimestamp: pulumi.Output<string>;
/**
* An optional description of this resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Indicates if a router is dedicated for use with encrypted VLAN
* attachments (interconnectAttachments).
*/
readonly encryptedInterconnectRouter: pulumi.Output<boolean | undefined>;
/**
* Keys used for MD5 authentication.
* Structure is documented below.
*/
readonly md5AuthenticationKeys: pulumi.Output<outputs.compute.RouterMd5AuthenticationKeys | undefined>;
/**
* 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<string>;
/**
* A reference to the network to which this router belongs.
*/
readonly network: pulumi.Output<string>;
/**
* Additional params passed with the request, but not persisted as part of resource payload
* Structure is documented below.
*/
readonly params: pulumi.Output<outputs.compute.RouterParams | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Region where the router resides.
*/
readonly region: pulumi.Output<string>;
/**
* The URI of the created resource.
*/
readonly selfLink: pulumi.Output<string>;
/**
* 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<inputs.compute.RouterBgp>;
/**
* Creation timestamp in RFC3339 text format.
*/
creationTimestamp?: pulumi.Input<string>;
/**
* An optional description of this resource.
*/
description?: pulumi.Input<string>;
/**
* Indicates if a router is dedicated for use with encrypted VLAN
* attachments (interconnectAttachments).
*/
encryptedInterconnectRouter?: pulumi.Input<boolean>;
/**
* Keys used for MD5 authentication.
* Structure is documented below.
*/
md5AuthenticationKeys?: pulumi.Input<inputs.compute.RouterMd5AuthenticationKeys>;
/**
* 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<string>;
/**
* A reference to the network to which this router belongs.
*/
network?: pulumi.Input<string>;
/**
* Additional params passed with the request, but not persisted as part of resource payload
* Structure is documented below.
*/
params?: pulumi.Input<inputs.compute.RouterParams>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Region where the router resides.
*/
region?: pulumi.Input<string>;
/**
* The URI of the created resource.
*/
selfLink?: pulumi.Input<string>;
}
/**
* 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<inputs.compute.RouterBgp>;
/**
* An optional description of this resource.
*/
description?: pulumi.Input<string>;
/**
* Indicates if a router is dedicated for use with encrypted VLAN
* attachments (interconnectAttachments).
*/
encryptedInterconnectRouter?: pulumi.Input<boolean>;
/**
* Keys used for MD5 authentication.
* Structure is documented below.
*/
md5AuthenticationKeys?: pulumi.Input<inputs.compute.RouterMd5AuthenticationKeys>;
/**
* 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<string>;
/**
* A reference to the network to which this router belongs.
*/
network: pulumi.Input<string>;
/**
* Additional params passed with the request, but not persisted as part of resource payload
* Structure is documented below.
*/
params?: pulumi.Input<inputs.compute.RouterParams>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Region where the router resides.
*/
region?: pulumi.Input<string>;
}