@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
402 lines (401 loc) • 15.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Hyperdisk Storage Pool is a pre-purchased collection of capacity, throughput, and IOPS
* which you can then provision to your applications as needed.
* You can use Hyperdisk Storage Pools to create and manage disks in pools and use the disks across multiple workloads.
*
* To get more information about StoragePool, see:
*
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/storagePools)
* * How-to Guides
* * [Create Hyperdisk Storage Pools](https://cloud.google.com/compute/docs/disks/create-storage-pools)
*
* ## Example Usage
*
* ### Compute Storage Pool Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const test_storage_pool_basic = new gcp.compute.StoragePool("test-storage-pool-basic", {
* name: "storage-pool-basic",
* poolProvisionedCapacityGb: "10240",
* poolProvisionedThroughput: "100",
* storagePoolType: "hyperdisk-throughput",
* zone: "us-central1-a",
* labels: {
* environment: "test",
* purpose: "storage-pool-testing",
* team: "infrastructure",
* cost_center: "engineering",
* },
* deletionProtection: false,
* });
* const project = gcp.organizations.getProject({});
* ```
* ### Compute Storage Pool Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const balanced = gcp.compute.getStoragePoolTypes({
* zone: "us-central1-a",
* storagePoolType: "hyperdisk-balanced",
* });
* const test_storage_pool_full = new gcp.compute.StoragePool("test-storage-pool-full", {
* name: "storage-pool-full",
* description: "Hyperdisk Balanced storage pool",
* capacityProvisioningType: "STANDARD",
* poolProvisionedCapacityGb: "10240",
* performanceProvisioningType: "STANDARD",
* poolProvisionedIops: "10000",
* poolProvisionedThroughput: "1024",
* storagePoolType: balanced.then(balanced => balanced.selfLink),
* labels: {
* environment: "test",
* purpose: "storage-pool-testing",
* team: "infrastructure",
* cost_center: "engineering",
* },
* deletionProtection: false,
* zone: "us-central1-a",
* });
* const project = gcp.organizations.getProject({});
* ```
*
* ## Import
*
* StoragePool can be imported using any of these accepted formats:
*
* * `projects/{{project}}/zones/{{zone}}/storagePools/{{name}}`
*
* * `{{project}}/{{zone}}/{{name}}`
*
* * `{{zone}}/{{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, StoragePool can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:compute/storagePool:StoragePool default projects/{{project}}/zones/{{zone}}/storagePools/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:compute/storagePool:StoragePool default {{project}}/{{zone}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:compute/storagePool:StoragePool default {{zone}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:compute/storagePool:StoragePool default {{name}}
* ```
*/
export declare class StoragePool extends pulumi.CustomResource {
/**
* Get an existing StoragePool 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?: StoragePoolState, opts?: pulumi.CustomResourceOptions): StoragePool;
/**
* Returns true if the given object is an instance of StoragePool. 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 StoragePool;
/**
* Provisioning type of the byte capacity of the pool.
* Possible values are: `STANDARD`, `ADVANCED`.
*/
readonly capacityProvisioningType: pulumi.Output<string>;
/**
* Creation timestamp in RFC3339 text format.
*/
readonly creationTimestamp: pulumi.Output<string>;
readonly deletionProtection: pulumi.Output<boolean | undefined>;
/**
* A description of this resource. Provide this property when you create the resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* 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;
}>;
/**
* Type of the resource.
*/
readonly kind: pulumi.Output<string>;
/**
* The fingerprint used for optimistic locking of this resource.
* Used internally during updates.
*/
readonly labelFingerprint: pulumi.Output<string>;
/**
* Labels to apply to this storage pool. These can be later modified by the setLabels method.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Name of the resource. Provided by the client when the resource is created.
* 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>;
/**
* Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS.
* Possible values are: `STANDARD`, `ADVANCED`.
*/
readonly performanceProvisioningType: pulumi.Output<string>;
/**
* Size, in GiB, of the storage pool. For more information about the size limits,
* see https://cloud.google.com/compute/docs/disks/storage-pools.
*/
readonly poolProvisionedCapacityGb: pulumi.Output<string>;
/**
* Provisioned IOPS of the storage pool.
* Only relevant if the storage pool type is `hyperdisk-balanced`.
*/
readonly poolProvisionedIops: pulumi.Output<string | undefined>;
/**
* Provisioned throughput, in MB/s, of the storage pool.
* Only relevant if the storage pool type is `hyperdisk-balanced` or `hyperdisk-throughput`.
*/
readonly poolProvisionedThroughput: 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;
}>;
/**
* Status information for the storage pool resource.
* Structure is documented below.
*/
readonly resourceStatuses: pulumi.Output<outputs.compute.StoragePoolResourceStatus[]>;
/**
* Status information for the storage pool resource.
* Structure is documented below.
*/
readonly statuses: pulumi.Output<outputs.compute.StoragePoolStatus[]>;
/**
* Type of the storage pool. For example, the
* following are valid values:
* * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced`
* * `hyperdisk-throughput`
*/
readonly storagePoolType: pulumi.Output<string>;
/**
* A reference to the zone where the storage pool resides.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a StoragePool 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: StoragePoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering StoragePool resources.
*/
export interface StoragePoolState {
/**
* Provisioning type of the byte capacity of the pool.
* Possible values are: `STANDARD`, `ADVANCED`.
*/
capacityProvisioningType?: pulumi.Input<string>;
/**
* Creation timestamp in RFC3339 text format.
*/
creationTimestamp?: pulumi.Input<string>;
deletionProtection?: pulumi.Input<boolean>;
/**
* A description of this resource. Provide this property when you create the resource.
*/
description?: 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>;
}>;
/**
* Type of the resource.
*/
kind?: pulumi.Input<string>;
/**
* The fingerprint used for optimistic locking of this resource.
* Used internally during updates.
*/
labelFingerprint?: pulumi.Input<string>;
/**
* Labels to apply to this storage pool. These can be later modified by the setLabels method.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the resource. Provided by the client when the resource is created.
* 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>;
/**
* Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS.
* Possible values are: `STANDARD`, `ADVANCED`.
*/
performanceProvisioningType?: pulumi.Input<string>;
/**
* Size, in GiB, of the storage pool. For more information about the size limits,
* see https://cloud.google.com/compute/docs/disks/storage-pools.
*/
poolProvisionedCapacityGb?: pulumi.Input<string>;
/**
* Provisioned IOPS of the storage pool.
* Only relevant if the storage pool type is `hyperdisk-balanced`.
*/
poolProvisionedIops?: pulumi.Input<string>;
/**
* Provisioned throughput, in MB/s, of the storage pool.
* Only relevant if the storage pool type is `hyperdisk-balanced` or `hyperdisk-throughput`.
*/
poolProvisionedThroughput?: 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>;
}>;
/**
* Status information for the storage pool resource.
* Structure is documented below.
*/
resourceStatuses?: pulumi.Input<pulumi.Input<inputs.compute.StoragePoolResourceStatus>[]>;
/**
* Status information for the storage pool resource.
* Structure is documented below.
*/
statuses?: pulumi.Input<pulumi.Input<inputs.compute.StoragePoolStatus>[]>;
/**
* Type of the storage pool. For example, the
* following are valid values:
* * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced`
* * `hyperdisk-throughput`
*/
storagePoolType?: pulumi.Input<string>;
/**
* A reference to the zone where the storage pool resides.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a StoragePool resource.
*/
export interface StoragePoolArgs {
/**
* Provisioning type of the byte capacity of the pool.
* Possible values are: `STANDARD`, `ADVANCED`.
*/
capacityProvisioningType?: pulumi.Input<string>;
deletionProtection?: pulumi.Input<boolean>;
/**
* A description of this resource. Provide this property when you create the resource.
*/
description?: pulumi.Input<string>;
/**
* Labels to apply to this storage pool. These can be later modified by the setLabels method.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the resource. Provided by the client when the resource is created.
* 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>;
/**
* Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS.
* Possible values are: `STANDARD`, `ADVANCED`.
*/
performanceProvisioningType?: pulumi.Input<string>;
/**
* Size, in GiB, of the storage pool. For more information about the size limits,
* see https://cloud.google.com/compute/docs/disks/storage-pools.
*/
poolProvisionedCapacityGb: pulumi.Input<string>;
/**
* Provisioned IOPS of the storage pool.
* Only relevant if the storage pool type is `hyperdisk-balanced`.
*/
poolProvisionedIops?: pulumi.Input<string>;
/**
* Provisioned throughput, in MB/s, of the storage pool.
* Only relevant if the storage pool type is `hyperdisk-balanced` or `hyperdisk-throughput`.
*/
poolProvisionedThroughput: 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>;
/**
* Type of the storage pool. For example, the
* following are valid values:
* * `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone}/storagePoolTypes/hyperdisk-balanced`
* * `hyperdisk-throughput`
*/
storagePoolType: pulumi.Input<string>;
/**
* A reference to the zone where the storage pool resides.
*/
zone?: pulumi.Input<string>;
}