VolumeV2

Manages a V2 volume resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var volume1 = new OpenStack.BlockStorage.VolumeV2("volume1", new OpenStack.BlockStorage.VolumeV2Args
        {
            Description = "first test volume",
            Region = "RegionOne",
            Size = 3,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

volume1 = openstack.blockstorage.VolumeV2("volume1",
    description="first test volume",
    region="RegionOne",
    size=3)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const volume1 = new openstack.blockstorage.VolumeV2("volume_1", {
    description: "first test volume",
    region: "RegionOne",
    size: 3,
});

Create a VolumeV2 Resource

def VolumeV2(resource_name, opts=None, availability_zone=None, consistency_group_id=None, description=None, image_id=None, metadata=None, name=None, region=None, scheduler_hints=None, size=None, snapshot_id=None, source_replica=None, source_vol_id=None, volume_type=None, __props__=None);
func NewVolumeV2(ctx *Context, name string, args VolumeV2Args, opts ...ResourceOption) (*VolumeV2, error)
public VolumeV2(string name, VolumeV2Args args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VolumeV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VolumeV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VolumeV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VolumeV2 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VolumeV2 resource accepts the following input properties:

Size int

The size of the volume to create (in gigabytes). Changing this creates a new volume.

AvailabilityZone string

The availability zone for the volume. Changing this creates a new volume.

ConsistencyGroupId string

The consistency group to place the volume in.

Description string

A description of the volume. Changing this updates the volume’s description.

ImageId string

The image ID from which to create the volume. Changing this creates a new volume.

Metadata Dictionary<string, object>

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

Name string

A unique name for the volume. Changing this updates the volume’s name.

Region 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.

SchedulerHints List<Pulumi.OpenStack.BlockStorage.Inputs.VolumeV2SchedulerHintArgs>

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

SnapshotId string

The snapshot ID from which to create the volume. Changing this creates a new volume.

SourceReplica string

The volume ID to replicate with.

SourceVolId string

The volume ID from which to create the volume. Changing this creates a new volume.

VolumeType string

The type of volume to create. Changing this creates a new volume.

Size int

The size of the volume to create (in gigabytes). Changing this creates a new volume.

AvailabilityZone string

The availability zone for the volume. Changing this creates a new volume.

ConsistencyGroupId string

The consistency group to place the volume in.

Description string

A description of the volume. Changing this updates the volume’s description.

ImageId string

The image ID from which to create the volume. Changing this creates a new volume.

Metadata map[string]interface{}

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

Name string

A unique name for the volume. Changing this updates the volume’s name.

Region 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.

SchedulerHints []VolumeV2SchedulerHint

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

SnapshotId string

The snapshot ID from which to create the volume. Changing this creates a new volume.

SourceReplica string

The volume ID to replicate with.

SourceVolId string

The volume ID from which to create the volume. Changing this creates a new volume.

VolumeType string

The type of volume to create. Changing this creates a new volume.

size number

The size of the volume to create (in gigabytes). Changing this creates a new volume.

availabilityZone string

The availability zone for the volume. Changing this creates a new volume.

consistencyGroupId string

The consistency group to place the volume in.

description string

A description of the volume. Changing this updates the volume’s description.

imageId string

The image ID from which to create the volume. Changing this creates a new volume.

metadata {[key: string]: any}

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

name string

A unique name for the volume. Changing this updates the volume’s name.

region 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.

schedulerHints VolumeV2SchedulerHint[]

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

snapshotId string

The snapshot ID from which to create the volume. Changing this creates a new volume.

sourceReplica string

The volume ID to replicate with.

sourceVolId string

The volume ID from which to create the volume. Changing this creates a new volume.

volumeType string

The type of volume to create. Changing this creates a new volume.

size float

The size of the volume to create (in gigabytes). Changing this creates a new volume.

availability_zone str

The availability zone for the volume. Changing this creates a new volume.

consistency_group_id str

The consistency group to place the volume in.

description str

A description of the volume. Changing this updates the volume’s description.

image_id str

The image ID from which to create the volume. Changing this creates a new volume.

metadata Dict[str, Any]

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

name str

A unique name for the volume. Changing this updates the volume’s name.

region str

The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new volume.

scheduler_hints List[VolumeV2SchedulerHint]

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

snapshot_id str

The snapshot ID from which to create the volume. Changing this creates a new volume.

source_replica str

The volume ID to replicate with.

source_vol_id str

The volume ID from which to create the volume. Changing this creates a new volume.

volume_type str

The type of volume to create. Changing this creates a new volume.

Outputs

All input properties are implicitly available as output properties. Additionally, the VolumeV2 resource produces the following output properties:

Attachments List<Pulumi.OpenStack.BlockStorage.Outputs.VolumeV2Attachment>

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.

Id string
The provider-assigned unique ID for this managed resource.
Attachments []VolumeV2Attachment

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.

Id string
The provider-assigned unique ID for this managed resource.
attachments VolumeV2Attachment[]

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.

id string
The provider-assigned unique ID for this managed resource.
attachments List[VolumeV2Attachment]

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.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing VolumeV2 Resource

Get an existing VolumeV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VolumeV2State, opts?: CustomResourceOptions): VolumeV2
static get(resource_name, id, opts=None, attachments=None, availability_zone=None, consistency_group_id=None, description=None, image_id=None, metadata=None, name=None, region=None, scheduler_hints=None, size=None, snapshot_id=None, source_replica=None, source_vol_id=None, volume_type=None, __props__=None);
func GetVolumeV2(ctx *Context, name string, id IDInput, state *VolumeV2State, opts ...ResourceOption) (*VolumeV2, error)
public static VolumeV2 Get(string name, Input<string> id, VolumeV2State? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Attachments List<Pulumi.OpenStack.BlockStorage.Inputs.VolumeV2AttachmentArgs>

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.

AvailabilityZone string

The availability zone for the volume. Changing this creates a new volume.

ConsistencyGroupId string

The consistency group to place the volume in.

Description string

A description of the volume. Changing this updates the volume’s description.

ImageId string

The image ID from which to create the volume. Changing this creates a new volume.

Metadata Dictionary<string, object>

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

Name string

A unique name for the volume. Changing this updates the volume’s name.

Region 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.

SchedulerHints List<Pulumi.OpenStack.BlockStorage.Inputs.VolumeV2SchedulerHintArgs>

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

Size int

The size of the volume to create (in gigabytes). Changing this creates a new volume.

SnapshotId string

The snapshot ID from which to create the volume. Changing this creates a new volume.

SourceReplica string

The volume ID to replicate with.

SourceVolId string

The volume ID from which to create the volume. Changing this creates a new volume.

VolumeType string

The type of volume to create. Changing this creates a new volume.

Attachments []VolumeV2Attachment

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.

AvailabilityZone string

The availability zone for the volume. Changing this creates a new volume.

ConsistencyGroupId string

The consistency group to place the volume in.

Description string

A description of the volume. Changing this updates the volume’s description.

ImageId string

The image ID from which to create the volume. Changing this creates a new volume.

Metadata map[string]interface{}

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

Name string

A unique name for the volume. Changing this updates the volume’s name.

Region 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.

SchedulerHints []VolumeV2SchedulerHint

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

Size int

The size of the volume to create (in gigabytes). Changing this creates a new volume.

SnapshotId string

The snapshot ID from which to create the volume. Changing this creates a new volume.

SourceReplica string

The volume ID to replicate with.

SourceVolId string

The volume ID from which to create the volume. Changing this creates a new volume.

VolumeType string

The type of volume to create. Changing this creates a new volume.

attachments VolumeV2Attachment[]

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.

availabilityZone string

The availability zone for the volume. Changing this creates a new volume.

consistencyGroupId string

The consistency group to place the volume in.

description string

A description of the volume. Changing this updates the volume’s description.

imageId string

The image ID from which to create the volume. Changing this creates a new volume.

metadata {[key: string]: any}

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

name string

A unique name for the volume. Changing this updates the volume’s name.

region 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.

schedulerHints VolumeV2SchedulerHint[]

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

size number

The size of the volume to create (in gigabytes). Changing this creates a new volume.

snapshotId string

The snapshot ID from which to create the volume. Changing this creates a new volume.

sourceReplica string

The volume ID to replicate with.

sourceVolId string

The volume ID from which to create the volume. Changing this creates a new volume.

volumeType string

The type of volume to create. Changing this creates a new volume.

attachments List[VolumeV2Attachment]

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.

availability_zone str

The availability zone for the volume. Changing this creates a new volume.

consistency_group_id str

The consistency group to place the volume in.

description str

A description of the volume. Changing this updates the volume’s description.

image_id str

The image ID from which to create the volume. Changing this creates a new volume.

metadata Dict[str, Any]

Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.

name str

A unique name for the volume. Changing this updates the volume’s name.

region str

The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new volume.

scheduler_hints List[VolumeV2SchedulerHint]

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

size float

The size of the volume to create (in gigabytes). Changing this creates a new volume.

snapshot_id str

The snapshot ID from which to create the volume. Changing this creates a new volume.

source_replica str

The volume ID to replicate with.

source_vol_id str

The volume ID from which to create the volume. Changing this creates a new volume.

volume_type str

The type of volume to create. Changing this creates a new volume.

Supporting Types

VolumeV2Attachment

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Device string
Id string
InstanceId string
Device string
Id string
InstanceId string
device string
id string
instanceId string
device str
id str
instance_id str

VolumeV2SchedulerHint

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AdditionalProperties Dictionary<string, object>

Arbitrary key/value pairs of additional properties to pass to the scheduler.

DifferentHosts List<string>

The volume should be scheduled on a different host from the set of volumes specified in the list provided.

LocalToInstance string

An instance UUID. The volume should be scheduled on the same host as the instance.

Query string

A conditional query that a back-end must pass in order to host a volume. The query must use the JsonFilter syntax which is described here. At this time, only simple queries are supported. Compound queries using and, or, or not are not supported. An example of a simple query is:

SameHosts List<string>

A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.

AdditionalProperties map[string]interface{}

Arbitrary key/value pairs of additional properties to pass to the scheduler.

DifferentHosts []string

The volume should be scheduled on a different host from the set of volumes specified in the list provided.

LocalToInstance string

An instance UUID. The volume should be scheduled on the same host as the instance.

Query string

A conditional query that a back-end must pass in order to host a volume. The query must use the JsonFilter syntax which is described here. At this time, only simple queries are supported. Compound queries using and, or, or not are not supported. An example of a simple query is:

SameHosts []string

A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.

additionalProperties {[key: string]: any}

Arbitrary key/value pairs of additional properties to pass to the scheduler.

differentHosts string[]

The volume should be scheduled on a different host from the set of volumes specified in the list provided.

localToInstance string

An instance UUID. The volume should be scheduled on the same host as the instance.

query string

A conditional query that a back-end must pass in order to host a volume. The query must use the JsonFilter syntax which is described here. At this time, only simple queries are supported. Compound queries using and, or, or not are not supported. An example of a simple query is:

sameHosts string[]

A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.

additionalProperties Dict[str, Any]

Arbitrary key/value pairs of additional properties to pass to the scheduler.

differentHosts List[str]

The volume should be scheduled on a different host from the set of volumes specified in the list provided.

localToInstance str

An instance UUID. The volume should be scheduled on the same host as the instance.

query str

A conditional query that a back-end must pass in order to host a volume. The query must use the JsonFilter syntax which is described here. At this time, only simple queries are supported. Compound queries using and, or, or not are not supported. An example of a simple query is:

sameHosts List[str]

A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.