import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Persistent disks are used for data storage and function similarly to physical hard and solid state drives. * * A disk can be attached or detached from the virtual machine and can be located locally. A disk can be moved between virtual machines within the same availability zone. Each disk can be attached to only one virtual machine at a time. * * For more information about disks in Yandex.Cloud, see: * * * [Documentation](https://cloud.yandex.com/docs/compute/concepts/disk) * * How-to Guides * * [Attach and detach a disk](https://cloud.yandex.com/docs/compute/concepts/disk#attach-detach) * * [Backup operation](https://cloud.yandex.com/docs/compute/concepts/disk#backup) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const defaultComputeDisk = new yandex.ComputeDisk("default", { * imageId: "ubuntu-16.04-v20180727", * labels: { * environment: "test", * }, * type: "network-ssd", * zone: "ru-central1-a", * }); * ``` * ### Non-Replicated Disk * * **Note**: Non-replicated disks are at the [Preview](https://cloud.yandex.com/docs/overview/concepts/launch-stages) * stage. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const _this = new yandex.ComputeDiskPlacementGroup("this", {zone: "ru-central1-b"}); * const nr = new yandex.ComputeDisk("nr", { * size: 93, * type: "network-ssd-nonreplicated", * zone: "ru-central1-b", * diskPlacementPolicy: { * diskPlacementGroupId: _this.id, * }, * }); * ``` * * ## Import * * A disk can be imported using any of these accepted formats * * ```sh * $ pulumi import yandex:index/computeDisk:ComputeDisk default disk_id * ``` */ export declare class ComputeDisk extends pulumi.CustomResource { /** * Get an existing ComputeDisk 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, state?: ComputeDiskState, opts?: pulumi.CustomResourceOptions): ComputeDisk; /** * Returns true if the given object is an instance of ComputeDisk. 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 ComputeDisk; readonly blockSize: pulumi.Output; /** * Creation timestamp of the disk. */ readonly createdAt: pulumi.Output; /** * - * (Optional) Description of the disk. Provide this property when * you create a resource. */ readonly description: pulumi.Output; /** * Disk placement policy configuration. The structure is documented below. */ readonly diskPlacementPolicy: pulumi.Output; /** * (Optional) The ID of the folder that the disk belongs to. * If it is not provided, the default provider folder is used. */ readonly folderId: pulumi.Output; /** * The source image to use for disk creation. */ readonly imageId: pulumi.Output; /** * Labels to assign to this disk. A list of key/value pairs. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Name of the disk. Provide this property when * you create a resource. */ readonly name: pulumi.Output; readonly productIds: pulumi.Output; /** * Size of the persistent disk, specified in GB. You can specify this * field when creating a persistent disk using the `imageId` or `snapshotId` * parameter, or specify it alone to create an empty persistent disk. * If you specify this field along with `imageId` or `snapshotId`, * the size value must not be less than the size of the source image * or the size of the snapshot. */ readonly size: pulumi.Output; /** * The source snapshot to use for disk creation. */ readonly snapshotId: pulumi.Output; /** * The status of the disk. */ readonly status: pulumi.Output; /** * Type of disk to create. Provide this when creating a disk. */ readonly type: pulumi.Output; /** * Availability zone where the disk will reside. */ readonly zone: pulumi.Output; /** * Create a ComputeDisk 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?: ComputeDiskArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ComputeDisk resources. */ export interface ComputeDiskState { blockSize?: pulumi.Input; /** * Creation timestamp of the disk. */ createdAt?: pulumi.Input; /** * - * (Optional) Description of the disk. Provide this property when * you create a resource. */ description?: pulumi.Input; /** * Disk placement policy configuration. The structure is documented below. */ diskPlacementPolicy?: pulumi.Input; /** * (Optional) The ID of the folder that the disk belongs to. * If it is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * The source image to use for disk creation. */ imageId?: pulumi.Input; /** * Labels to assign to this disk. A list of key/value pairs. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the disk. Provide this property when * you create a resource. */ name?: pulumi.Input; productIds?: pulumi.Input[]>; /** * Size of the persistent disk, specified in GB. You can specify this * field when creating a persistent disk using the `imageId` or `snapshotId` * parameter, or specify it alone to create an empty persistent disk. * If you specify this field along with `imageId` or `snapshotId`, * the size value must not be less than the size of the source image * or the size of the snapshot. */ size?: pulumi.Input; /** * The source snapshot to use for disk creation. */ snapshotId?: pulumi.Input; /** * The status of the disk. */ status?: pulumi.Input; /** * Type of disk to create. Provide this when creating a disk. */ type?: pulumi.Input; /** * Availability zone where the disk will reside. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a ComputeDisk resource. */ export interface ComputeDiskArgs { blockSize?: pulumi.Input; /** * - * (Optional) Description of the disk. Provide this property when * you create a resource. */ description?: pulumi.Input; /** * Disk placement policy configuration. The structure is documented below. */ diskPlacementPolicy?: pulumi.Input; /** * (Optional) The ID of the folder that the disk belongs to. * If it is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * The source image to use for disk creation. */ imageId?: pulumi.Input; /** * Labels to assign to this disk. A list of key/value pairs. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the disk. Provide this property when * you create a resource. */ name?: pulumi.Input; /** * Size of the persistent disk, specified in GB. You can specify this * field when creating a persistent disk using the `imageId` or `snapshotId` * parameter, or specify it alone to create an empty persistent disk. * If you specify this field along with `imageId` or `snapshotId`, * the size value must not be less than the size of the source image * or the size of the snapshot. */ size?: pulumi.Input; /** * The source snapshot to use for disk creation. */ snapshotId?: pulumi.Input; /** * Type of disk to create. Provide this when creating a disk. */ type?: pulumi.Input; /** * Availability zone where the disk will reside. */ zone?: pulumi.Input; }