@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
306 lines (305 loc) • 14.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* ## subcategory: "Cloud Bigtable"
*
* description: |-
* Creates a Google Bigtable instance.
* ---
*
* # gcp.bigtable.Instance
*
* Creates a Google Bigtable instance. For more information see:
*
* * [API documentation](https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/bigtable/docs)
*
* ## Example Usage
*
* ### Simple Instance
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const production_instance = new gcp.bigtable.Instance("production-instance", {
* name: "tf-instance",
* clusters: [{
* clusterId: "tf-instance-cluster",
* numNodes: 1,
* storageType: "HDD",
* }],
* labels: {
* "my-label": "prod-label",
* },
* });
* ```
*
* ### Replicated Instance
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const production_instance = new gcp.bigtable.Instance("production-instance", {
* name: "tf-instance",
* clusters: [
* {
* clusterId: "tf-instance-cluster1",
* numNodes: 1,
* storageType: "HDD",
* zone: "us-central1-c",
* },
* {
* clusterId: "tf-instance-cluster2",
* storageType: "HDD",
* zone: "us-central1-b",
* autoscalingConfig: {
* minNodes: 1,
* maxNodes: 3,
* cpuTarget: 50,
* },
* },
* ],
* labels: {
* "my-label": "prod-label",
* },
* });
* ```
*
* ## Import
*
* Bigtable Instances can be imported using any of these accepted formats:
*
* * `projects/{{project}}/instances/{{name}}`
*
* * `{{project}}/{{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, Bigtable Instances can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:bigtable/instance:Instance default projects/{{project}}/instances/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:bigtable/instance:Instance default {{project}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:bigtable/instance:Instance default {{name}}
* ```
*/
export declare class Instance extends pulumi.CustomResource {
/**
* Get an existing Instance 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?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance;
/**
* Returns true if the given object is an instance of Instance. 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 Instance;
/**
* A block of cluster configuration options. This can be specified at least once, and up
* to as many as possible within 8 cloud regions. Removing the field entirely from the config will cause the provider
* to default to the backend value. See structure below.
*
* -----
*/
readonly clusters: pulumi.Output<outputs.bigtable.InstanceCluster[]>;
/**
* Whether or not to allow this provider to destroy the instance. Unless this field is set to false
* in the statefile, a `pulumi destroy` or `pulumi up` that would delete the instance will fail.
*/
readonly deletionProtection: pulumi.Output<boolean | undefined>;
/**
* The human-readable display name of the Bigtable instance. Defaults to the instance `name`.
*/
readonly displayName: pulumi.Output<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*
* -----
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Deleting a BigTable instance can be blocked if any backups are present in the instance. When `forceDestroy` is set to true, the Provider will delete all backups found in the BigTable instance before attempting to delete the instance itself. Defaults to false.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
/**
* The instance type to create. One of `"DEVELOPMENT"` or `"PRODUCTION"`. Defaults to `"PRODUCTION"`.
* It is recommended to leave this field unspecified since the distinction between `"DEVELOPMENT"` and `"PRODUCTION"` instances is going away,
* and all instances will become `"PRODUCTION"` instances. This means that new and existing `"DEVELOPMENT"` instances will be converted to
* `"PRODUCTION"` instances. It is recommended for users to use `"PRODUCTION"` instances in any case, since a 1-node `"PRODUCTION"` instance
* is functionally identical to a `"DEVELOPMENT"` instance, but without the accompanying restrictions.
*
* @deprecated It is recommended to leave this field unspecified since the distinction between "DEVELOPMENT" and "PRODUCTION" instances is going away, and all instances will become "PRODUCTION" instances. This means that new and existing "DEVELOPMENT" instances will be converted to "PRODUCTION" instances. It is recommended for users to use "PRODUCTION" instances in any case, since a 1-node "PRODUCTION" instance is functionally identical to a "DEVELOPMENT" instance, but without the accompanying restrictions.
*/
readonly instanceType: pulumi.Output<string | undefined>;
/**
* A set of key/value label pairs to assign to the resource. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The name (also called Instance Id in the Cloud Console) of the Cloud Bigtable instance. Must be 6-33 characters and must only contain hyphens, lowercase letters and numbers.
*/
readonly name: 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>;
/**
* The combination of labels configured directly on the resource and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Create a Instance 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?: InstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Instance resources.
*/
export interface InstanceState {
/**
* A block of cluster configuration options. This can be specified at least once, and up
* to as many as possible within 8 cloud regions. Removing the field entirely from the config will cause the provider
* to default to the backend value. See structure below.
*
* -----
*/
clusters?: pulumi.Input<pulumi.Input<inputs.bigtable.InstanceCluster>[]>;
/**
* Whether or not to allow this provider to destroy the instance. Unless this field is set to false
* in the statefile, a `pulumi destroy` or `pulumi up` that would delete the instance will fail.
*/
deletionProtection?: pulumi.Input<boolean>;
/**
* The human-readable display name of the Bigtable instance. Defaults to the instance `name`.
*/
displayName?: pulumi.Input<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*
* -----
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Deleting a BigTable instance can be blocked if any backups are present in the instance. When `forceDestroy` is set to true, the Provider will delete all backups found in the BigTable instance before attempting to delete the instance itself. Defaults to false.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* The instance type to create. One of `"DEVELOPMENT"` or `"PRODUCTION"`. Defaults to `"PRODUCTION"`.
* It is recommended to leave this field unspecified since the distinction between `"DEVELOPMENT"` and `"PRODUCTION"` instances is going away,
* and all instances will become `"PRODUCTION"` instances. This means that new and existing `"DEVELOPMENT"` instances will be converted to
* `"PRODUCTION"` instances. It is recommended for users to use `"PRODUCTION"` instances in any case, since a 1-node `"PRODUCTION"` instance
* is functionally identical to a `"DEVELOPMENT"` instance, but without the accompanying restrictions.
*
* @deprecated It is recommended to leave this field unspecified since the distinction between "DEVELOPMENT" and "PRODUCTION" instances is going away, and all instances will become "PRODUCTION" instances. This means that new and existing "DEVELOPMENT" instances will be converted to "PRODUCTION" instances. It is recommended for users to use "PRODUCTION" instances in any case, since a 1-node "PRODUCTION" instance is functionally identical to a "DEVELOPMENT" instance, but without the accompanying restrictions.
*/
instanceType?: pulumi.Input<string>;
/**
* A set of key/value label pairs to assign to the resource. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The name (also called Instance Id in the Cloud Console) of the Cloud Bigtable instance. Must be 6-33 characters and must only contain hyphens, lowercase letters and numbers.
*/
name?: 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>;
/**
* The combination of labels configured directly on the resource and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a Instance resource.
*/
export interface InstanceArgs {
/**
* A block of cluster configuration options. This can be specified at least once, and up
* to as many as possible within 8 cloud regions. Removing the field entirely from the config will cause the provider
* to default to the backend value. See structure below.
*
* -----
*/
clusters?: pulumi.Input<pulumi.Input<inputs.bigtable.InstanceCluster>[]>;
/**
* Whether or not to allow this provider to destroy the instance. Unless this field is set to false
* in the statefile, a `pulumi destroy` or `pulumi up` that would delete the instance will fail.
*/
deletionProtection?: pulumi.Input<boolean>;
/**
* The human-readable display name of the Bigtable instance. Defaults to the instance `name`.
*/
displayName?: pulumi.Input<string>;
/**
* Deleting a BigTable instance can be blocked if any backups are present in the instance. When `forceDestroy` is set to true, the Provider will delete all backups found in the BigTable instance before attempting to delete the instance itself. Defaults to false.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* The instance type to create. One of `"DEVELOPMENT"` or `"PRODUCTION"`. Defaults to `"PRODUCTION"`.
* It is recommended to leave this field unspecified since the distinction between `"DEVELOPMENT"` and `"PRODUCTION"` instances is going away,
* and all instances will become `"PRODUCTION"` instances. This means that new and existing `"DEVELOPMENT"` instances will be converted to
* `"PRODUCTION"` instances. It is recommended for users to use `"PRODUCTION"` instances in any case, since a 1-node `"PRODUCTION"` instance
* is functionally identical to a `"DEVELOPMENT"` instance, but without the accompanying restrictions.
*
* @deprecated It is recommended to leave this field unspecified since the distinction between "DEVELOPMENT" and "PRODUCTION" instances is going away, and all instances will become "PRODUCTION" instances. This means that new and existing "DEVELOPMENT" instances will be converted to "PRODUCTION" instances. It is recommended for users to use "PRODUCTION" instances in any case, since a 1-node "PRODUCTION" instance is functionally identical to a "DEVELOPMENT" instance, but without the accompanying restrictions.
*/
instanceType?: pulumi.Input<string>;
/**
* A set of key/value label pairs to assign to the resource. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The name (also called Instance Id in the Cloud Console) of the Cloud Bigtable instance. Must be 6-33 characters and must only contain hyphens, lowercase letters and numbers.
*/
name?: 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>;
}