@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
340 lines (339 loc) • 12.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A Managed Lustre instance
*
* ## Example Usage
*
* ### Lustre Instance Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* // This example assumes this network already exists.
* // The API creates a tenant network per network authorized for a
* // Lustre instance and that network is not deleted when the user-created
* // network (authorized_network) is deleted, so this prevents issues
* // with tenant network quota.
* // If this network hasn't been created and you are using this example in your
* // config, add an additional network resource or change
* // this from "data"to "resource"
* const lustre_network = gcp.compute.getNetwork({
* name: "my-network",
* });
* const instance = new gcp.lustre.Instance("instance", {
* instanceId: "my-instance",
* location: "us-central1-a",
* description: "test lustre instance",
* filesystem: "testfs",
* capacityGib: "18000",
* network: lustre_network.then(lustre_network => lustre_network.id),
* labels: {
* test: "value",
* },
* });
* ```
*
* ## Import
*
* Instance can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/instances/{{instance_id}}`
*
* * `{{project}}/{{location}}/{{instance_id}}`
*
* * `{{location}}/{{instance_id}}`
*
* When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:lustre/instance:Instance default projects/{{project}}/locations/{{location}}/instances/{{instance_id}}
* ```
*
* ```sh
* $ pulumi import gcp:lustre/instance:Instance default {{project}}/{{location}}/{{instance_id}}
* ```
*
* ```sh
* $ pulumi import gcp:lustre/instance:Instance default {{location}}/{{instance_id}}
* ```
*/
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;
/**
* Required. The storage capacity of the instance in gibibytes (GiB). Allowed values
* are from 18000 to 954000, in increments of 9000.
*/
readonly capacityGib: pulumi.Output<string>;
/**
* Output only. Timestamp when the instance was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Optional. A user-readable description of the instance.
*/
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;
}>;
/**
* Required. Immutable. The filesystem name for this instance. This name is used by client-side
* tools, including when mounting the instance. Must be 8 characters or less
* and may only contain letters and numbers.
*/
readonly filesystem: pulumi.Output<string>;
/**
* Optional. Indicates whether you want to enable support for GKE clients. By default,
* GKE clients are not supported.
*/
readonly gkeSupportEnabled: pulumi.Output<boolean | undefined>;
/**
* Required. The name of the Managed Lustre instance.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
*
*
* - - -
*/
readonly instanceId: pulumi.Output<string>;
/**
* Optional. Labels as key value pairs.
* **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>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
readonly location: pulumi.Output<string>;
/**
* Output only. Mount point of the instance in the format `IP_ADDRESS@tcp:/FILESYSTEM`.
*/
readonly mountPoint: pulumi.Output<string>;
/**
* Identifier. The name of the instance.
*/
readonly name: pulumi.Output<string>;
/**
* Required. Immutable. The full name of the VPC network to which the instance is connected.
* Must be in the format
* `projects/{project_id}/global/networks/{network_name}`.
*/
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>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Output only. The state of the instance.
* Possible values:
* STATE_UNSPECIFIED
* ACTIVE
* CREATING
* DELETING
* UPGRADING
* REPAIRING
* STOPPED
*/
readonly state: pulumi.Output<string>;
/**
* Output only. Timestamp when the instance was last updated.
*/
readonly updateTime: pulumi.Output<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 {
/**
* Required. The storage capacity of the instance in gibibytes (GiB). Allowed values
* are from 18000 to 954000, in increments of 9000.
*/
capacityGib?: pulumi.Input<string>;
/**
* Output only. Timestamp when the instance was created.
*/
createTime?: pulumi.Input<string>;
/**
* Optional. A user-readable description of the instance.
*/
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>;
}>;
/**
* Required. Immutable. The filesystem name for this instance. This name is used by client-side
* tools, including when mounting the instance. Must be 8 characters or less
* and may only contain letters and numbers.
*/
filesystem?: pulumi.Input<string>;
/**
* Optional. Indicates whether you want to enable support for GKE clients. By default,
* GKE clients are not supported.
*/
gkeSupportEnabled?: pulumi.Input<boolean>;
/**
* Required. The name of the Managed Lustre instance.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
*
*
* - - -
*/
instanceId?: pulumi.Input<string>;
/**
* Optional. Labels as key value pairs.
* **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>;
}>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location?: pulumi.Input<string>;
/**
* Output only. Mount point of the instance in the format `IP_ADDRESS@tcp:/FILESYSTEM`.
*/
mountPoint?: pulumi.Input<string>;
/**
* Identifier. The name of the instance.
*/
name?: pulumi.Input<string>;
/**
* Required. Immutable. The full name of the VPC network to which the instance is connected.
* Must be in the format
* `projects/{project_id}/global/networks/{network_name}`.
*/
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>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Output only. The state of the instance.
* Possible values:
* STATE_UNSPECIFIED
* ACTIVE
* CREATING
* DELETING
* UPGRADING
* REPAIRING
* STOPPED
*/
state?: pulumi.Input<string>;
/**
* Output only. Timestamp when the instance was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Instance resource.
*/
export interface InstanceArgs {
/**
* Required. The storage capacity of the instance in gibibytes (GiB). Allowed values
* are from 18000 to 954000, in increments of 9000.
*/
capacityGib: pulumi.Input<string>;
/**
* Optional. A user-readable description of the instance.
*/
description?: pulumi.Input<string>;
/**
* Required. Immutable. The filesystem name for this instance. This name is used by client-side
* tools, including when mounting the instance. Must be 8 characters or less
* and may only contain letters and numbers.
*/
filesystem: pulumi.Input<string>;
/**
* Optional. Indicates whether you want to enable support for GKE clients. By default,
* GKE clients are not supported.
*/
gkeSupportEnabled?: pulumi.Input<boolean>;
/**
* Required. The name of the Managed Lustre instance.
* * Must contain only lowercase letters, numbers, and hyphens.
* * Must start with a letter.
* * Must be between 1-63 characters.
* * Must end with a number or a letter.
*
*
* - - -
*/
instanceId: pulumi.Input<string>;
/**
* Optional. Labels as key value pairs.
* **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>;
}>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location: pulumi.Input<string>;
/**
* Required. Immutable. The full name of the VPC network to which the instance is connected.
* Must be in the format
* `projects/{project_id}/global/networks/{network_name}`.
*/
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>;
}