@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
370 lines • 13.3 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,
* },
* });
* ```
* ### 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_88722",
* 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}}
* $ 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}}
* ```
*/
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>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: 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>;
/**
* (Optional, Beta)
* A URI of an NCC Gateway spoke
*/
readonly nccGateway: pulumi.Output<string | undefined>;
/**
* A reference to the network to which this router belongs.
*/
readonly network: pulumi.Output<string | undefined>;
/**
* 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 | undefined>;
/**
* Creation timestamp in RFC3339 text format.
*/
creationTimestamp?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* An optional description of this resource.
*/
description?: pulumi.Input<string | undefined>;
/**
* Indicates if a router is dedicated for use with encrypted VLAN
* attachments (interconnectAttachments).
*/
encryptedInterconnectRouter?: pulumi.Input<boolean | undefined>;
/**
* Keys used for MD5 authentication.
* Structure is documented below.
*/
md5AuthenticationKeys?: pulumi.Input<inputs.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.
*/
name?: pulumi.Input<string | undefined>;
/**
* (Optional, Beta)
* A URI of an NCC Gateway spoke
*/
nccGateway?: pulumi.Input<string | undefined>;
/**
* A reference to the network to which this router belongs.
*/
network?: pulumi.Input<string | undefined>;
/**
* Additional params passed with the request, but not persisted as part of resource payload
* Structure is documented below.
*/
params?: pulumi.Input<inputs.compute.RouterParams | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Region where the router resides.
*/
region?: pulumi.Input<string | undefined>;
/**
* The URI of the created resource.
*/
selfLink?: pulumi.Input<string | undefined>;
}
/**
* 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 | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* An optional description of this resource.
*/
description?: pulumi.Input<string | undefined>;
/**
* Indicates if a router is dedicated for use with encrypted VLAN
* attachments (interconnectAttachments).
*/
encryptedInterconnectRouter?: pulumi.Input<boolean | undefined>;
/**
* Keys used for MD5 authentication.
* Structure is documented below.
*/
md5AuthenticationKeys?: pulumi.Input<inputs.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.
*/
name?: pulumi.Input<string | undefined>;
/**
* (Optional, Beta)
* A URI of an NCC Gateway spoke
*/
nccGateway?: pulumi.Input<string | undefined>;
/**
* A reference to the network to which this router belongs.
*/
network?: pulumi.Input<string | undefined>;
/**
* Additional params passed with the request, but not persisted as part of resource payload
* Structure is documented below.
*/
params?: pulumi.Input<inputs.compute.RouterParams | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* Region where the router resides.
*/
region?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=router.d.ts.map