@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
297 lines (296 loc) • 12.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Serverless VPC Access connector resource.
*
* To get more information about Connector, see:
*
* * [API documentation](https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1/projects.locations.connectors)
* * How-to Guides
* * [Configuring Serverless VPC Access](https://cloud.google.com/vpc/docs/configure-serverless-vpc-access)
*
* ## Example Usage
*
* ### Vpc Access Connector
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const connector = new gcp.vpcaccess.Connector("connector", {
* name: "vpc-con",
* ipCidrRange: "10.8.0.0/28",
* network: "default",
* minInstances: 2,
* maxInstances: 3,
* });
* ```
* ### Vpc Access Connector Shared Vpc
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const customTest = new gcp.compute.Subnetwork("custom_test", {
* name: "vpc-con",
* ipCidrRange: "10.2.0.0/28",
* region: "us-central1",
* network: "default",
* });
* const connector = new gcp.vpcaccess.Connector("connector", {
* name: "vpc-con",
* subnet: {
* name: customTest.name,
* },
* machineType: "e2-standard-4",
* minInstances: 2,
* maxInstances: 3,
* });
* ```
*
* ## Import
*
* Connector can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{region}}/connectors/{{name}}`
*
* * `{{project}}/{{region}}/{{name}}`
*
* * `{{region}}/{{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, Connector can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:vpcaccess/connector:Connector default projects/{{project}}/locations/{{region}}/connectors/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vpcaccess/connector:Connector default {{project}}/{{region}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vpcaccess/connector:Connector default {{region}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vpcaccess/connector:Connector default {{name}}
* ```
*/
export declare class Connector extends pulumi.CustomResource {
/**
* Get an existing Connector 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?: ConnectorState, opts?: pulumi.CustomResourceOptions): Connector;
/**
* Returns true if the given object is an instance of Connector. 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 Connector;
/**
* List of projects using the connector.
*/
readonly connectedProjects: pulumi.Output<string[]>;
/**
* The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.
*/
readonly ipCidrRange: pulumi.Output<string | undefined>;
/**
* Machine type of VM Instance underlying connector. Default is e2-micro
*/
readonly machineType: pulumi.Output<string | undefined>;
/**
* Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be
* higher than the value specified by min_instances. Required alongside `minInstances` if not using `minThroughput`/`maxThroughput`.
*/
readonly maxInstances: pulumi.Output<number>;
/**
* Maximum throughput of the connector in Mbps, must be greater than `minThroughput`. Default is 300. Refers to the expected throughput
* when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by
* min_throughput. Only one of `maxThroughput` and `maxInstances` can be specified. The use of maxThroughput is discouraged in favor of max_instances.
*/
readonly maxThroughput: pulumi.Output<number>;
/**
* Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be
* lower than the value specified by max_instances. Required alongside `maxInstances` if not using `minThroughput`/`maxThroughput`.
*/
readonly minInstances: pulumi.Output<number>;
/**
* Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type.
* Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput.
* Only one of `minThroughput` and `minInstances` can be specified. The use of minThroughput is discouraged in favor of min_instances.
*/
readonly minThroughput: pulumi.Output<number>;
/**
* The name of the resource (Max 25 characters).
*/
readonly name: pulumi.Output<string>;
/**
* Name or selfLink of the VPC network. Required if `ipCidrRange` is set.
*/
readonly network: pulumi.Output<string>;
/**
* 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 VPC Access connector resides. If it is not provided, the provider region is used.
*/
readonly region: pulumi.Output<string>;
/**
* The fully qualified name of this VPC connector
*/
readonly selfLink: pulumi.Output<string>;
/**
* State of the VPC access connector.
*/
readonly state: pulumi.Output<string>;
/**
* The subnet in which to house the connector
* Structure is documented below.
*/
readonly subnet: pulumi.Output<outputs.vpcaccess.ConnectorSubnet | undefined>;
/**
* Create a Connector 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?: ConnectorArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Connector resources.
*/
export interface ConnectorState {
/**
* List of projects using the connector.
*/
connectedProjects?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.
*/
ipCidrRange?: pulumi.Input<string>;
/**
* Machine type of VM Instance underlying connector. Default is e2-micro
*/
machineType?: pulumi.Input<string>;
/**
* Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be
* higher than the value specified by min_instances. Required alongside `minInstances` if not using `minThroughput`/`maxThroughput`.
*/
maxInstances?: pulumi.Input<number>;
/**
* Maximum throughput of the connector in Mbps, must be greater than `minThroughput`. Default is 300. Refers to the expected throughput
* when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by
* min_throughput. Only one of `maxThroughput` and `maxInstances` can be specified. The use of maxThroughput is discouraged in favor of max_instances.
*/
maxThroughput?: pulumi.Input<number>;
/**
* Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be
* lower than the value specified by max_instances. Required alongside `maxInstances` if not using `minThroughput`/`maxThroughput`.
*/
minInstances?: pulumi.Input<number>;
/**
* Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type.
* Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput.
* Only one of `minThroughput` and `minInstances` can be specified. The use of minThroughput is discouraged in favor of min_instances.
*/
minThroughput?: pulumi.Input<number>;
/**
* The name of the resource (Max 25 characters).
*/
name?: pulumi.Input<string>;
/**
* Name or selfLink of the VPC network. Required if `ipCidrRange` is set.
*/
network?: pulumi.Input<string>;
/**
* 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 VPC Access connector resides. If it is not provided, the provider region is used.
*/
region?: pulumi.Input<string>;
/**
* The fully qualified name of this VPC connector
*/
selfLink?: pulumi.Input<string>;
/**
* State of the VPC access connector.
*/
state?: pulumi.Input<string>;
/**
* The subnet in which to house the connector
* Structure is documented below.
*/
subnet?: pulumi.Input<inputs.vpcaccess.ConnectorSubnet>;
}
/**
* The set of arguments for constructing a Connector resource.
*/
export interface ConnectorArgs {
/**
* The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.
*/
ipCidrRange?: pulumi.Input<string>;
/**
* Machine type of VM Instance underlying connector. Default is e2-micro
*/
machineType?: pulumi.Input<string>;
/**
* Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be
* higher than the value specified by min_instances. Required alongside `minInstances` if not using `minThroughput`/`maxThroughput`.
*/
maxInstances?: pulumi.Input<number>;
/**
* Maximum throughput of the connector in Mbps, must be greater than `minThroughput`. Default is 300. Refers to the expected throughput
* when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by
* min_throughput. Only one of `maxThroughput` and `maxInstances` can be specified. The use of maxThroughput is discouraged in favor of max_instances.
*/
maxThroughput?: pulumi.Input<number>;
/**
* Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be
* lower than the value specified by max_instances. Required alongside `maxInstances` if not using `minThroughput`/`maxThroughput`.
*/
minInstances?: pulumi.Input<number>;
/**
* Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type.
* Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput.
* Only one of `minThroughput` and `minInstances` can be specified. The use of minThroughput is discouraged in favor of min_instances.
*/
minThroughput?: pulumi.Input<number>;
/**
* The name of the resource (Max 25 characters).
*/
name?: pulumi.Input<string>;
/**
* Name or selfLink of the VPC network. Required if `ipCidrRange` is set.
*/
network?: pulumi.Input<string>;
/**
* 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 VPC Access connector resides. If it is not provided, the provider region is used.
*/
region?: pulumi.Input<string>;
/**
* The subnet in which to house the connector
* Structure is documented below.
*/
subnet?: pulumi.Input<inputs.vpcaccess.ConnectorSubnet>;
}