1. Packages
  2. Openstack Provider
  3. API Docs
  4. blockstorage
  5. Volume
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.blockstorage.Volume

Explore with Pulumi AI

Manages a V3 volume resource within OpenStack.

Example Usage

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,
});
Copy
import pulumi
import pulumi_openstack as openstack

volume1 = openstack.blockstorage.Volume("volume_1",
    region="RegionOne",
    name="volume_1",
    description="first test volume",
    size=3)
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/blockstorage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := blockstorage.NewVolume(ctx, "volume_1", &blockstorage.VolumeArgs{
			Region:      pulumi.String("RegionOne"),
			Name:        pulumi.String("volume_1"),
			Description: pulumi.String("first test volume"),
			Size:        pulumi.Int(3),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var volume1 = new OpenStack.BlockStorage.Volume("volume_1", new()
    {
        Region = "RegionOne",
        Name = "volume_1",
        Description = "first test volume",
        Size = 3,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.blockstorage.Volume;
import com.pulumi.openstack.blockstorage.VolumeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var volume1 = new Volume("volume1", VolumeArgs.builder()
            .region("RegionOne")
            .name("volume_1")
            .description("first test volume")
            .size(3)
            .build());

    }
}
Copy
resources:
  volume1:
    type: openstack:blockstorage:Volume
    name: volume_1
    properties:
      region: RegionOne
      name: volume_1
      description: first test volume
      size: 3
Copy

Create Volume Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
@overload
def Volume(resource_name: str,
           args: VolumeArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Volume(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           size: Optional[int] = None,
           metadata: Optional[Mapping[str, str]] = None,
           region: Optional[str] = None,
           description: Optional[str] = None,
           enable_online_resize: Optional[bool] = None,
           image_id: Optional[str] = None,
           availability_zone: Optional[str] = None,
           name: Optional[str] = None,
           consistency_group_id: Optional[str] = None,
           scheduler_hints: Optional[Sequence[VolumeSchedulerHintArgs]] = None,
           backup_id: Optional[str] = None,
           snapshot_id: Optional[str] = None,
           source_replica: Optional[str] = None,
           source_vol_id: Optional[str] = None,
           volume_type: Optional[str] = None)
func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
public Volume(String name, VolumeArgs args)
public Volume(String name, VolumeArgs args, CustomResourceOptions options)
type: openstack:blockstorage:Volume
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VolumeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VolumeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VolumeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VolumeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VolumeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var volumeResource = new OpenStack.BlockStorage.Volume("volumeResource", new()
{
    Size = 0,
    Metadata = 
    {
        { "string", "string" },
    },
    Region = "string",
    Description = "string",
    EnableOnlineResize = false,
    ImageId = "string",
    AvailabilityZone = "string",
    Name = "string",
    ConsistencyGroupId = "string",
    SchedulerHints = new[]
    {
        new OpenStack.BlockStorage.Inputs.VolumeSchedulerHintArgs
        {
            AdditionalProperties = 
            {
                { "string", "string" },
            },
            DifferentHosts = new[]
            {
                "string",
            },
            LocalToInstance = "string",
            Query = "string",
            SameHosts = new[]
            {
                "string",
            },
        },
    },
    BackupId = "string",
    SnapshotId = "string",
    SourceReplica = "string",
    SourceVolId = "string",
    VolumeType = "string",
});
Copy
example, err := blockstorage.NewVolume(ctx, "volumeResource", &blockstorage.VolumeArgs{
	Size: pulumi.Int(0),
	Metadata: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Region:             pulumi.String("string"),
	Description:        pulumi.String("string"),
	EnableOnlineResize: pulumi.Bool(false),
	ImageId:            pulumi.String("string"),
	AvailabilityZone:   pulumi.String("string"),
	Name:               pulumi.String("string"),
	ConsistencyGroupId: pulumi.String("string"),
	SchedulerHints: blockstorage.VolumeSchedulerHintArray{
		&blockstorage.VolumeSchedulerHintArgs{
			AdditionalProperties: pulumi.StringMap{
				"string": pulumi.String("string"),
			},
			DifferentHosts: pulumi.StringArray{
				pulumi.String("string"),
			},
			LocalToInstance: pulumi.String("string"),
			Query:           pulumi.String("string"),
			SameHosts: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	BackupId:      pulumi.String("string"),
	SnapshotId:    pulumi.String("string"),
	SourceReplica: pulumi.String("string"),
	SourceVolId:   pulumi.String("string"),
	VolumeType:    pulumi.String("string"),
})
Copy
var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
    .size(0)
    .metadata(Map.of("string", "string"))
    .region("string")
    .description("string")
    .enableOnlineResize(false)
    .imageId("string")
    .availabilityZone("string")
    .name("string")
    .consistencyGroupId("string")
    .schedulerHints(VolumeSchedulerHintArgs.builder()
        .additionalProperties(Map.of("string", "string"))
        .differentHosts("string")
        .localToInstance("string")
        .query("string")
        .sameHosts("string")
        .build())
    .backupId("string")
    .snapshotId("string")
    .sourceReplica("string")
    .sourceVolId("string")
    .volumeType("string")
    .build());
Copy
volume_resource = openstack.blockstorage.Volume("volumeResource",
    size=0,
    metadata={
        "string": "string",
    },
    region="string",
    description="string",
    enable_online_resize=False,
    image_id="string",
    availability_zone="string",
    name="string",
    consistency_group_id="string",
    scheduler_hints=[{
        "additional_properties": {
            "string": "string",
        },
        "different_hosts": ["string"],
        "local_to_instance": "string",
        "query": "string",
        "same_hosts": ["string"],
    }],
    backup_id="string",
    snapshot_id="string",
    source_replica="string",
    source_vol_id="string",
    volume_type="string")
Copy
const volumeResource = new openstack.blockstorage.Volume("volumeResource", {
    size: 0,
    metadata: {
        string: "string",
    },
    region: "string",
    description: "string",
    enableOnlineResize: false,
    imageId: "string",
    availabilityZone: "string",
    name: "string",
    consistencyGroupId: "string",
    schedulerHints: [{
        additionalProperties: {
            string: "string",
        },
        differentHosts: ["string"],
        localToInstance: "string",
        query: "string",
        sameHosts: ["string"],
    }],
    backupId: "string",
    snapshotId: "string",
    sourceReplica: "string",
    sourceVolId: "string",
    volumeType: "string",
});
Copy
type: openstack:blockstorage:Volume
properties:
    availabilityZone: string
    backupId: string
    consistencyGroupId: string
    description: string
    enableOnlineResize: false
    imageId: string
    metadata:
        string: string
    name: string
    region: string
    schedulerHints:
        - additionalProperties:
            string: string
          differentHosts:
            - string
          localToInstance: string
          query: string
          sameHosts:
            - string
    size: 0
    snapshotId: string
    sourceReplica: string
    sourceVolId: string
    volumeType: string
Copy

Volume Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Volume resource accepts the following input properties:

Size This property is required. int
The size of the volume to create (in gigabytes).
AvailabilityZone Changes to this property will trigger replacement. string
The availability zone for the volume. Changing this creates a new volume.
BackupId Changes to this property will trigger replacement. string
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
ConsistencyGroupId Changes to this property will trigger replacement. string
The consistency group to place the volume in.
Description string
A description of the volume. Changing this updates the volume's description.
EnableOnlineResize bool
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.
ImageId Changes to this property will trigger replacement. string
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
Metadata Dictionary<string, string>
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 Changes to this property will trigger replacement. 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.VolumeSchedulerHint>
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
SnapshotId Changes to this property will trigger replacement. string
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
SourceReplica Changes to this property will trigger replacement. string
The volume ID to replicate with.
SourceVolId Changes to this property will trigger replacement. string
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
VolumeType Changes to this property will trigger replacement. string
The type of volume to create. Changing this creates a new volume.
Size This property is required. int
The size of the volume to create (in gigabytes).
AvailabilityZone Changes to this property will trigger replacement. string
The availability zone for the volume. Changing this creates a new volume.
BackupId Changes to this property will trigger replacement. string
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
ConsistencyGroupId Changes to this property will trigger replacement. string
The consistency group to place the volume in.
Description string
A description of the volume. Changing this updates the volume's description.
EnableOnlineResize bool
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.
ImageId Changes to this property will trigger replacement. string
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
Metadata map[string]string
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 Changes to this property will trigger replacement. 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 []VolumeSchedulerHintArgs
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
SnapshotId Changes to this property will trigger replacement. string
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
SourceReplica Changes to this property will trigger replacement. string
The volume ID to replicate with.
SourceVolId Changes to this property will trigger replacement. string
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
VolumeType Changes to this property will trigger replacement. string
The type of volume to create. Changing this creates a new volume.
size This property is required. Integer
The size of the volume to create (in gigabytes).
availabilityZone Changes to this property will trigger replacement. String
The availability zone for the volume. Changing this creates a new volume.
backupId Changes to this property will trigger replacement. String
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistencyGroupId Changes to this property will trigger replacement. String
The consistency group to place the volume in.
description String
A description of the volume. Changing this updates the volume's description.
enableOnlineResize Boolean
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.
imageId Changes to this property will trigger replacement. String
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata Map<String,String>
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 Changes to this property will trigger replacement. 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<VolumeSchedulerHint>
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
snapshotId Changes to this property will trigger replacement. String
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
sourceReplica Changes to this property will trigger replacement. String
The volume ID to replicate with.
sourceVolId Changes to this property will trigger replacement. String
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volumeType Changes to this property will trigger replacement. String
The type of volume to create. Changing this creates a new volume.
size This property is required. number
The size of the volume to create (in gigabytes).
availabilityZone Changes to this property will trigger replacement. string
The availability zone for the volume. Changing this creates a new volume.
backupId Changes to this property will trigger replacement. string
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistencyGroupId Changes to this property will trigger replacement. string
The consistency group to place the volume in.
description string
A description of the volume. Changing this updates the volume's description.
enableOnlineResize boolean
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.
imageId Changes to this property will trigger replacement. string
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata {[key: string]: string}
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 Changes to this property will trigger replacement. 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 VolumeSchedulerHint[]
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
snapshotId Changes to this property will trigger replacement. string
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
sourceReplica Changes to this property will trigger replacement. string
The volume ID to replicate with.
sourceVolId Changes to this property will trigger replacement. string
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volumeType Changes to this property will trigger replacement. string
The type of volume to create. Changing this creates a new volume.
size This property is required. int
The size of the volume to create (in gigabytes).
availability_zone Changes to this property will trigger replacement. str
The availability zone for the volume. Changing this creates a new volume.
backup_id Changes to this property will trigger replacement. str
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistency_group_id Changes to this property will trigger replacement. str
The consistency group to place the volume in.
description str
A description of the volume. Changing this updates the volume's description.
enable_online_resize bool
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.
image_id Changes to this property will trigger replacement. str
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata Mapping[str, str]
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 Changes to this property will trigger replacement. 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 Sequence[VolumeSchedulerHintArgs]
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
snapshot_id Changes to this property will trigger replacement. str
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
source_replica Changes to this property will trigger replacement. str
The volume ID to replicate with.
source_vol_id Changes to this property will trigger replacement. str
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volume_type Changes to this property will trigger replacement. str
The type of volume to create. Changing this creates a new volume.
size This property is required. Number
The size of the volume to create (in gigabytes).
availabilityZone Changes to this property will trigger replacement. String
The availability zone for the volume. Changing this creates a new volume.
backupId Changes to this property will trigger replacement. String
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistencyGroupId Changes to this property will trigger replacement. String
The consistency group to place the volume in.
description String
A description of the volume. Changing this updates the volume's description.
enableOnlineResize Boolean
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.
imageId Changes to this property will trigger replacement. String
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata Map<String>
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 Changes to this property will trigger replacement. 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<Property Map>
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
snapshotId Changes to this property will trigger replacement. String
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
sourceReplica Changes to this property will trigger replacement. String
The volume ID to replicate with.
sourceVolId Changes to this property will trigger replacement. String
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volumeType Changes to this property will trigger replacement. String
The type of volume to create. Changing this creates a new volume.

Outputs

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

Attachments List<Pulumi.OpenStack.BlockStorage.Outputs.VolumeAttachment>
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 []VolumeAttachment
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<VolumeAttachment>
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 VolumeAttachment[]
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 Sequence[VolumeAttachment]
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.
attachments List<Property Map>
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.

Look up Existing Volume Resource

Get an existing Volume 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?: VolumeState, opts?: CustomResourceOptions): Volume
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attachments: Optional[Sequence[VolumeAttachmentArgs]] = None,
        availability_zone: Optional[str] = None,
        backup_id: Optional[str] = None,
        consistency_group_id: Optional[str] = None,
        description: Optional[str] = None,
        enable_online_resize: Optional[bool] = None,
        image_id: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        scheduler_hints: Optional[Sequence[VolumeSchedulerHintArgs]] = None,
        size: Optional[int] = None,
        snapshot_id: Optional[str] = None,
        source_replica: Optional[str] = None,
        source_vol_id: Optional[str] = None,
        volume_type: Optional[str] = None) -> Volume
func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
resources:  _:    type: openstack:blockstorage:Volume    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.VolumeAttachment>
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 Changes to this property will trigger replacement. string
The availability zone for the volume. Changing this creates a new volume.
BackupId Changes to this property will trigger replacement. string
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
ConsistencyGroupId Changes to this property will trigger replacement. string
The consistency group to place the volume in.
Description string
A description of the volume. Changing this updates the volume's description.
EnableOnlineResize bool
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.
ImageId Changes to this property will trigger replacement. string
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
Metadata Dictionary<string, string>
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 Changes to this property will trigger replacement. 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.VolumeSchedulerHint>
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).
SnapshotId Changes to this property will trigger replacement. string
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
SourceReplica Changes to this property will trigger replacement. string
The volume ID to replicate with.
SourceVolId Changes to this property will trigger replacement. string
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
VolumeType Changes to this property will trigger replacement. string
The type of volume to create. Changing this creates a new volume.
Attachments []VolumeAttachmentArgs
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 Changes to this property will trigger replacement. string
The availability zone for the volume. Changing this creates a new volume.
BackupId Changes to this property will trigger replacement. string
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
ConsistencyGroupId Changes to this property will trigger replacement. string
The consistency group to place the volume in.
Description string
A description of the volume. Changing this updates the volume's description.
EnableOnlineResize bool
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.
ImageId Changes to this property will trigger replacement. string
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
Metadata map[string]string
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 Changes to this property will trigger replacement. 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 []VolumeSchedulerHintArgs
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).
SnapshotId Changes to this property will trigger replacement. string
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
SourceReplica Changes to this property will trigger replacement. string
The volume ID to replicate with.
SourceVolId Changes to this property will trigger replacement. string
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
VolumeType Changes to this property will trigger replacement. string
The type of volume to create. Changing this creates a new volume.
attachments List<VolumeAttachment>
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 Changes to this property will trigger replacement. String
The availability zone for the volume. Changing this creates a new volume.
backupId Changes to this property will trigger replacement. String
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistencyGroupId Changes to this property will trigger replacement. String
The consistency group to place the volume in.
description String
A description of the volume. Changing this updates the volume's description.
enableOnlineResize Boolean
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.
imageId Changes to this property will trigger replacement. String
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata Map<String,String>
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 Changes to this property will trigger replacement. 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<VolumeSchedulerHint>
Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
size Integer
The size of the volume to create (in gigabytes).
snapshotId Changes to this property will trigger replacement. String
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
sourceReplica Changes to this property will trigger replacement. String
The volume ID to replicate with.
sourceVolId Changes to this property will trigger replacement. String
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volumeType Changes to this property will trigger replacement. String
The type of volume to create. Changing this creates a new volume.
attachments VolumeAttachment[]
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 Changes to this property will trigger replacement. string
The availability zone for the volume. Changing this creates a new volume.
backupId Changes to this property will trigger replacement. string
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistencyGroupId Changes to this property will trigger replacement. string
The consistency group to place the volume in.
description string
A description of the volume. Changing this updates the volume's description.
enableOnlineResize boolean
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.
imageId Changes to this property will trigger replacement. string
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata {[key: string]: string}
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 Changes to this property will trigger replacement. 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 VolumeSchedulerHint[]
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).
snapshotId Changes to this property will trigger replacement. string
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
sourceReplica Changes to this property will trigger replacement. string
The volume ID to replicate with.
sourceVolId Changes to this property will trigger replacement. string
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volumeType Changes to this property will trigger replacement. string
The type of volume to create. Changing this creates a new volume.
attachments Sequence[VolumeAttachmentArgs]
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 Changes to this property will trigger replacement. str
The availability zone for the volume. Changing this creates a new volume.
backup_id Changes to this property will trigger replacement. str
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistency_group_id Changes to this property will trigger replacement. str
The consistency group to place the volume in.
description str
A description of the volume. Changing this updates the volume's description.
enable_online_resize bool
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.
image_id Changes to this property will trigger replacement. str
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata Mapping[str, str]
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 Changes to this property will trigger replacement. 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 Sequence[VolumeSchedulerHintArgs]
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).
snapshot_id Changes to this property will trigger replacement. str
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
source_replica Changes to this property will trigger replacement. str
The volume ID to replicate with.
source_vol_id Changes to this property will trigger replacement. str
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volume_type Changes to this property will trigger replacement. str
The type of volume to create. Changing this creates a new volume.
attachments List<Property Map>
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 Changes to this property will trigger replacement. String
The availability zone for the volume. Changing this creates a new volume.
backupId Changes to this property will trigger replacement. String
The backup ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, image_id. Changing this creates a new volume. Requires microversion >= 3.47.
consistencyGroupId Changes to this property will trigger replacement. String
The consistency group to place the volume in.
description String
A description of the volume. Changing this updates the volume's description.
enableOnlineResize Boolean
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.
imageId Changes to this property will trigger replacement. String
The image ID from which to create the volume. Conflicts with snapshot_id, source_vol_id, backup_id. Changing this creates a new volume.
metadata Map<String>
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 Changes to this property will trigger replacement. 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<Property Map>
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).
snapshotId Changes to this property will trigger replacement. String
The snapshot ID from which to create the volume. Conflicts with source_vol_id, image_id, backup_id. Changing this creates a new volume.
sourceReplica Changes to this property will trigger replacement. String
The volume ID to replicate with.
sourceVolId Changes to this property will trigger replacement. String
The volume ID from which to create the volume. Conflicts with snapshot_id, image_id, backup_id. Changing this creates a new volume.
volumeType Changes to this property will trigger replacement. String
The type of volume to create. Changing this creates a new volume.

Supporting Types

VolumeAttachment
, VolumeAttachmentArgs

Device string
Id string
InstanceId string
Device string
Id string
InstanceId string
device String
id String
instanceId String
device string
id string
instanceId string
device String
id String
instanceId String

VolumeSchedulerHint
, VolumeSchedulerHintArgs

AdditionalProperties Changes to this property will trigger replacement. Dictionary<string, string>
Arbitrary key/value pairs of additional properties to pass to the scheduler.
DifferentHosts Changes to this property will trigger replacement. List<string>
The volume should be scheduled on a different host from the set of volumes specified in the list provided.
LocalToInstance Changes to this property will trigger replacement. string
An instance UUID. The volume should be scheduled on the same host as the instance.
Query Changes to this property will trigger replacement. 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:

[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
SameHosts Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. map[string]string
Arbitrary key/value pairs of additional properties to pass to the scheduler.
DifferentHosts Changes to this property will trigger replacement. []string
The volume should be scheduled on a different host from the set of volumes specified in the list provided.
LocalToInstance Changes to this property will trigger replacement. string
An instance UUID. The volume should be scheduled on the same host as the instance.
Query Changes to this property will trigger replacement. 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:

[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
SameHosts Changes to this property will trigger replacement. []string
A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.
additionalProperties Changes to this property will trigger replacement. Map<String,String>
Arbitrary key/value pairs of additional properties to pass to the scheduler.
differentHosts Changes to this property will trigger replacement. List<String>
The volume should be scheduled on a different host from the set of volumes specified in the list provided.
localToInstance Changes to this property will trigger replacement. String
An instance UUID. The volume should be scheduled on the same host as the instance.
query Changes to this property will trigger replacement. 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:

[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
sameHosts Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. {[key: string]: string}
Arbitrary key/value pairs of additional properties to pass to the scheduler.
differentHosts Changes to this property will trigger replacement. string[]
The volume should be scheduled on a different host from the set of volumes specified in the list provided.
localToInstance Changes to this property will trigger replacement. string
An instance UUID. The volume should be scheduled on the same host as the instance.
query Changes to this property will trigger replacement. 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:

[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
sameHosts Changes to this property will trigger replacement. string[]
A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.
additional_properties Changes to this property will trigger replacement. Mapping[str, str]
Arbitrary key/value pairs of additional properties to pass to the scheduler.
different_hosts Changes to this property will trigger replacement. Sequence[str]
The volume should be scheduled on a different host from the set of volumes specified in the list provided.
local_to_instance Changes to this property will trigger replacement. str
An instance UUID. The volume should be scheduled on the same host as the instance.
query Changes to this property will trigger replacement. 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:

[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
same_hosts Changes to this property will trigger replacement. Sequence[str]
A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.
additionalProperties Changes to this property will trigger replacement. Map<String>
Arbitrary key/value pairs of additional properties to pass to the scheduler.
differentHosts Changes to this property will trigger replacement. List<String>
The volume should be scheduled on a different host from the set of volumes specified in the list provided.
localToInstance Changes to this property will trigger replacement. String
An instance UUID. The volume should be scheduled on the same host as the instance.
query Changes to this property will trigger replacement. 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:

[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
sameHosts Changes to this property will trigger replacement. List<String>
A list of volume UUIDs. The volume should be scheduled on the same host as another volume specified in the list provided.

Import

Volumes can be imported using the id, e.g.

$ pulumi import openstack:blockstorage/volume:Volume volume_1 ea257959-eeb1-4c10-8d33-26f0409a755d
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.