import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * > **NOTE** Prefer using the new `ovh.CloudStorageBlockVolume` resource instead. * * Create volume in a public cloud project. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const volume = new ovh.cloudproject.Volume("volume", { * regionName: "xxx", * serviceName: "yyyyy", * description: "Terraform volume", * name: "terrformName", * size: 15, * type: "classic", * }); * ``` * * ### Encrypted volume with a customer managed key (CMK) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const encryptedVolume = new ovh.cloudproject.Volume("encrypted_volume", { * regionName: "xxx", * serviceName: "yyyyy", * description: "Terraform encrypted volume", * name: "encryptedVolume", * size: 15, * type: "classic", * encryption: { * encrypted: true, * kms: { * domainId: "", * serviceKeyId: "", * }, * }, * }); * ``` * * Omit the `kms` block to encrypt the volume with OVH managed keys (OMK): * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const encryptedVolume = new ovh.cloudproject.Volume("encrypted_volume", { * regionName: "xxx", * serviceName: "yyyyy", * name: "encryptedVolume", * size: 15, * type: "classic", * encryption: { * encrypted: true, * }, * }); * ``` * * ## Import * * The resource can be imported using the public cloud project ID, region and the volume ID, e.g., * * terraform * * import { * * to = ovh_cloud_project_volume.volume * * id = "//" * * } * * bash * * $ pulumi preview -generate-config-out=volume.tf * * $ pulumi up * * The file `volume.tf` will then contain the imported resource's configuration, that can be copied next to the `import` block above. See https://developer.hashicorp.com/terraform/language/import/generating-configuration for more details. */ export declare class Volume extends pulumi.CustomResource { /** * Get an existing Volume 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?: VolumeState, opts?: pulumi.CustomResourceOptions): Volume; /** * Returns true if the given object is an instance of Volume. 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 Volume; /** * The action of the operation */ readonly action: pulumi.Output; /** * Optional. Availability zone in which the volume is created. Required when `regionName` is a 3AZ region. **Changing this value recreates the resource.** */ readonly availabilityZone: pulumi.Output; /** * The completed date of the operation */ readonly completedAt: pulumi.Output; /** * The creation date of the operation */ readonly createdAt: pulumi.Output; /** * A description of the volume */ readonly description: pulumi.Output; /** * Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). **Changing this value recreates the resource.** */ readonly encryption: pulumi.Output; /** * Image ID */ readonly imageId: pulumi.Output; /** * Instance ID */ readonly instanceId: pulumi.Output; /** * Name of the volume */ readonly name: pulumi.Output; /** * Volume status */ readonly progress: pulumi.Output; /** * Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". **Changing this value recreates the resource.** */ readonly regionName: pulumi.Output; /** * List of regions */ readonly regions: pulumi.Output; /** * Id of the resource */ readonly resourceId: pulumi.Output; /** * Optional. The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.** */ readonly serviceName: pulumi.Output; /** * Size (GB) of the volume */ readonly size: pulumi.Output; /** * Snapshot ID */ readonly snapshotId: pulumi.Output; /** * Datetime of the operation creation */ readonly startedAt: pulumi.Output; /** * Volume status */ readonly status: pulumi.Output; /** * Sub-operations of the operation */ readonly subOperations: pulumi.Output; /** * Type of the volume **Changing this value recreates the resource.** Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks */ readonly type: pulumi.Output; /** * Volume ID */ readonly volumeId: pulumi.Output; /** * Create a Volume 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: VolumeArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Volume resources. */ export interface VolumeState { /** * The action of the operation */ action?: pulumi.Input; /** * Optional. Availability zone in which the volume is created. Required when `regionName` is a 3AZ region. **Changing this value recreates the resource.** */ availabilityZone?: pulumi.Input; /** * The completed date of the operation */ completedAt?: pulumi.Input; /** * The creation date of the operation */ createdAt?: pulumi.Input; /** * A description of the volume */ description?: pulumi.Input; /** * Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). **Changing this value recreates the resource.** */ encryption?: pulumi.Input; /** * Image ID */ imageId?: pulumi.Input; /** * Instance ID */ instanceId?: pulumi.Input; /** * Name of the volume */ name?: pulumi.Input; /** * Volume status */ progress?: pulumi.Input; /** * Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". **Changing this value recreates the resource.** */ regionName?: pulumi.Input; /** * List of regions */ regions?: pulumi.Input[]>; /** * Id of the resource */ resourceId?: pulumi.Input; /** * Optional. The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.** */ serviceName?: pulumi.Input; /** * Size (GB) of the volume */ size?: pulumi.Input; /** * Snapshot ID */ snapshotId?: pulumi.Input; /** * Datetime of the operation creation */ startedAt?: pulumi.Input; /** * Volume status */ status?: pulumi.Input; /** * Sub-operations of the operation */ subOperations?: pulumi.Input[]>; /** * Type of the volume **Changing this value recreates the resource.** Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks */ type?: pulumi.Input; /** * Volume ID */ volumeId?: pulumi.Input; } /** * The set of arguments for constructing a Volume resource. */ export interface VolumeArgs { /** * Optional. Availability zone in which the volume is created. Required when `regionName` is a 3AZ region. **Changing this value recreates the resource.** */ availabilityZone?: pulumi.Input; /** * A description of the volume */ description?: pulumi.Input; /** * Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). **Changing this value recreates the resource.** */ encryption?: pulumi.Input; /** * Image ID */ imageId?: pulumi.Input; /** * Instance ID */ instanceId?: pulumi.Input; /** * Name of the volume */ name?: pulumi.Input; /** * Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". **Changing this value recreates the resource.** */ regionName: pulumi.Input; /** * Optional. The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.** */ serviceName?: pulumi.Input; /** * Size (GB) of the volume */ size?: pulumi.Input; /** * Snapshot ID */ snapshotId?: pulumi.Input; /** * Type of the volume **Changing this value recreates the resource.** Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks */ type?: pulumi.Input; /** * Volume ID */ volumeId?: pulumi.Input; }