UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

337 lines (336 loc) • 12.2 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a V3 volume resource within OpenStack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const volume1 = new openstack.blockstorage.Volume("volume_1", { * region: "RegionOne", * name: "volume_1", * description: "first test volume", * size: 3, * }); * ``` * * ## Import * * Volumes can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:blockstorage/volume:Volume volume_1 ea257959-eeb1-4c10-8d33-26f0409a755d * ``` */ 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<pulumi.ID>, 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; /** * If a volume is attached to an instance, this attribute will * display the Attachment ID, Instance ID, and the Device as the Instance * sees it. */ readonly attachments: pulumi.Output<outputs.blockstorage.VolumeAttachment[]>; /** * The availability zone for the volume. * Changing this creates a new volume. */ readonly availabilityZone: pulumi.Output<string>; /** * The backup ID from which to create the volume. * Conflicts with `snapshotId`, `sourceVolId`, `imageId`. Changing this * creates a new volume. Requires microversion >= 3.47. */ readonly backupId: pulumi.Output<string | undefined>; /** * The consistency group to place the volume * in. */ readonly consistencyGroupId: pulumi.Output<string | undefined>; /** * A description of the volume. Changing this updates * the volume's description. */ readonly description: pulumi.Output<string | undefined>; /** * When this option is set it allows extending * attached volumes. Note: updating size of an attached volume requires Cinder * support for version 3.42 and a compatible storage driver. */ readonly enableOnlineResize: pulumi.Output<boolean | undefined>; /** * The image ID from which to create the volume. * Conflicts with `snapshotId`, `sourceVolId`, `backupId`. Changing this * creates a new volume. */ readonly imageId: pulumi.Output<string | undefined>; /** * Metadata key/value pairs to associate with the volume. * Changing this updates the existing volume metadata. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * A unique name for the volume. Changing this updates the * volume's name. */ readonly name: pulumi.Output<string>; /** * The region in which to create the volume. If * omitted, the `region` argument of the provider is used. Changing this * creates a new volume. */ readonly region: pulumi.Output<string>; /** * Provide the Cinder scheduler with hints on where * to instantiate a volume in the OpenStack cloud. The available hints are described below. */ readonly schedulerHints: pulumi.Output<outputs.blockstorage.VolumeSchedulerHint[] | undefined>; /** * The size of the volume to create (in gigabytes). */ readonly size: pulumi.Output<number>; /** * The snapshot ID from which to create the volume. * Conflicts with `sourceVolId`, `imageId`, `backupId`. Changing this * creates a new volume. */ readonly snapshotId: pulumi.Output<string | undefined>; /** * The volume ID to replicate with. */ readonly sourceReplica: pulumi.Output<string | undefined>; /** * The volume ID from which to create the volume. * Conflicts with `snapshotId`, `imageId`, `backupId`. Changing this * creates a new volume. */ readonly sourceVolId: pulumi.Output<string | undefined>; /** * Migration policy when changing `volumeType`. * `"never"` *(default)* prevents migration to another storage backend, while `"on-demand"` * allows migration if needed. Applicable only when updating `volumeType`. */ readonly volumeRetypePolicy: pulumi.Output<string | undefined>; /** * The type of volume to create or update. * Changing this will attempt an in-place retype operation; migration depends on `volumeRetypePolicy`. */ readonly volumeType: pulumi.Output<string>; /** * 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 { /** * If a volume is attached to an instance, this attribute will * display the Attachment ID, Instance ID, and the Device as the Instance * sees it. */ attachments?: pulumi.Input<pulumi.Input<inputs.blockstorage.VolumeAttachment>[]>; /** * The availability zone for the volume. * Changing this creates a new volume. */ availabilityZone?: pulumi.Input<string>; /** * The backup ID from which to create the volume. * Conflicts with `snapshotId`, `sourceVolId`, `imageId`. Changing this * creates a new volume. Requires microversion >= 3.47. */ backupId?: pulumi.Input<string>; /** * The consistency group to place the volume * in. */ consistencyGroupId?: pulumi.Input<string>; /** * A description of the volume. Changing this updates * the volume's description. */ description?: pulumi.Input<string>; /** * When this option is set it allows extending * attached volumes. Note: updating size of an attached volume requires Cinder * support for version 3.42 and a compatible storage driver. */ enableOnlineResize?: pulumi.Input<boolean>; /** * The image ID from which to create the volume. * Conflicts with `snapshotId`, `sourceVolId`, `backupId`. Changing this * creates a new volume. */ imageId?: pulumi.Input<string>; /** * Metadata key/value pairs to associate with the volume. * Changing this updates the existing volume metadata. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A unique name for the volume. Changing this updates the * volume's name. */ name?: pulumi.Input<string>; /** * The region in which to create the volume. If * omitted, the `region` argument of the provider is used. Changing this * creates a new volume. */ region?: pulumi.Input<string>; /** * Provide the Cinder scheduler with hints on where * to instantiate a volume in the OpenStack cloud. The available hints are described below. */ schedulerHints?: pulumi.Input<pulumi.Input<inputs.blockstorage.VolumeSchedulerHint>[]>; /** * The size of the volume to create (in gigabytes). */ size?: pulumi.Input<number>; /** * The snapshot ID from which to create the volume. * Conflicts with `sourceVolId`, `imageId`, `backupId`. Changing this * creates a new volume. */ snapshotId?: pulumi.Input<string>; /** * The volume ID to replicate with. */ sourceReplica?: pulumi.Input<string>; /** * The volume ID from which to create the volume. * Conflicts with `snapshotId`, `imageId`, `backupId`. Changing this * creates a new volume. */ sourceVolId?: pulumi.Input<string>; /** * Migration policy when changing `volumeType`. * `"never"` *(default)* prevents migration to another storage backend, while `"on-demand"` * allows migration if needed. Applicable only when updating `volumeType`. */ volumeRetypePolicy?: pulumi.Input<string>; /** * The type of volume to create or update. * Changing this will attempt an in-place retype operation; migration depends on `volumeRetypePolicy`. */ volumeType?: pulumi.Input<string>; } /** * The set of arguments for constructing a Volume resource. */ export interface VolumeArgs { /** * The availability zone for the volume. * Changing this creates a new volume. */ availabilityZone?: pulumi.Input<string>; /** * The backup ID from which to create the volume. * Conflicts with `snapshotId`, `sourceVolId`, `imageId`. Changing this * creates a new volume. Requires microversion >= 3.47. */ backupId?: pulumi.Input<string>; /** * The consistency group to place the volume * in. */ consistencyGroupId?: pulumi.Input<string>; /** * A description of the volume. Changing this updates * the volume's description. */ description?: pulumi.Input<string>; /** * When this option is set it allows extending * attached volumes. Note: updating size of an attached volume requires Cinder * support for version 3.42 and a compatible storage driver. */ enableOnlineResize?: pulumi.Input<boolean>; /** * The image ID from which to create the volume. * Conflicts with `snapshotId`, `sourceVolId`, `backupId`. Changing this * creates a new volume. */ imageId?: pulumi.Input<string>; /** * Metadata key/value pairs to associate with the volume. * Changing this updates the existing volume metadata. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A unique name for the volume. Changing this updates the * volume's name. */ name?: pulumi.Input<string>; /** * The region in which to create the volume. If * omitted, the `region` argument of the provider is used. Changing this * creates a new volume. */ region?: pulumi.Input<string>; /** * Provide the Cinder scheduler with hints on where * to instantiate a volume in the OpenStack cloud. The available hints are described below. */ schedulerHints?: pulumi.Input<pulumi.Input<inputs.blockstorage.VolumeSchedulerHint>[]>; /** * The size of the volume to create (in gigabytes). */ size: pulumi.Input<number>; /** * The snapshot ID from which to create the volume. * Conflicts with `sourceVolId`, `imageId`, `backupId`. Changing this * creates a new volume. */ snapshotId?: pulumi.Input<string>; /** * The volume ID to replicate with. */ sourceReplica?: pulumi.Input<string>; /** * The volume ID from which to create the volume. * Conflicts with `snapshotId`, `imageId`, `backupId`. Changing this * creates a new volume. */ sourceVolId?: pulumi.Input<string>; /** * Migration policy when changing `volumeType`. * `"never"` *(default)* prevents migration to another storage backend, while `"on-demand"` * allows migration if needed. Applicable only when updating `volumeType`. */ volumeRetypePolicy?: pulumi.Input<string>; /** * The type of volume to create or update. * Changing this will attempt an in-place retype operation; migration depends on `volumeRetypePolicy`. */ volumeType?: pulumi.Input<string>; }