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
new VolumeV2(name: string, args: VolumeV2Args, opts?: CustomResourceOptions);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.
- Availability
Zone string The availability zone for the volume. Changing this creates a new volume.
- Consistency
Group stringId The consistency group to place the volume in.
- Description string
A description of the volume. Changing this updates the volume’s description.
- Image
Id 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
regionargument of the provider is used. Changing this creates a new volume.- Scheduler
Hints List<Pulumi.Open Stack. Block Storage. Inputs. Volume V2Scheduler Hint Args> Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
- Snapshot
Id string The snapshot ID from which to create the volume. Changing this creates a new volume.
- Source
Replica string The volume ID to replicate with.
- Source
Vol stringId The volume ID from which to create the volume. Changing this creates a new volume.
- Volume
Type 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.
- Availability
Zone string The availability zone for the volume. Changing this creates a new volume.
- Consistency
Group stringId The consistency group to place the volume in.
- Description string
A description of the volume. Changing this updates the volume’s description.
- Image
Id 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
regionargument of the provider is used. Changing this creates a new volume.- Scheduler
Hints []VolumeV2Scheduler Hint Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
- Snapshot
Id string The snapshot ID from which to create the volume. Changing this creates a new volume.
- Source
Replica string The volume ID to replicate with.
- Source
Vol stringId The volume ID from which to create the volume. Changing this creates a new volume.
- Volume
Type 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.
- availability
Zone string The availability zone for the volume. Changing this creates a new volume.
- consistency
Group stringId The consistency group to place the volume in.
- description string
A description of the volume. Changing this updates the volume’s description.
- image
Id 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
regionargument of the provider is used. Changing this creates a new volume.- scheduler
Hints VolumeV2Scheduler Hint[] Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
- snapshot
Id string The snapshot ID from which to create the volume. Changing this creates a new volume.
- source
Replica string The volume ID to replicate with.
- source
Vol stringId The volume ID from which to create the volume. Changing this creates a new volume.
- volume
Type 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_ strid 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
regionargument of the provider is used. Changing this creates a new volume.- scheduler_
hints List[VolumeV2Scheduler Hint] 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_ strid 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.
Open Stack. Block Storage. Outputs. Volume V2Attachment> 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
[]Volume
V2Attachment 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
Volume
V2Attachment[] 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[Volume
V2Attachment] 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): VolumeV2static 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.
Open Stack. Block Storage. Inputs. Volume V2Attachment Args> 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 string The availability zone for the volume. Changing this creates a new volume.
- Consistency
Group stringId The consistency group to place the volume in.
- Description string
A description of the volume. Changing this updates the volume’s description.
- Image
Id 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
regionargument of the provider is used. Changing this creates a new volume.- Scheduler
Hints List<Pulumi.Open Stack. Block Storage. Inputs. Volume V2Scheduler Hint Args> 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.
- Snapshot
Id string The snapshot ID from which to create the volume. Changing this creates a new volume.
- Source
Replica string The volume ID to replicate with.
- Source
Vol stringId The volume ID from which to create the volume. Changing this creates a new volume.
- Volume
Type string The type of volume to create. Changing this creates a new volume.
- Attachments
[]Volume
V2Attachment 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 string The availability zone for the volume. Changing this creates a new volume.
- Consistency
Group stringId The consistency group to place the volume in.
- Description string
A description of the volume. Changing this updates the volume’s description.
- Image
Id 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
regionargument of the provider is used. Changing this creates a new volume.- Scheduler
Hints []VolumeV2Scheduler Hint 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.
- Snapshot
Id string The snapshot ID from which to create the volume. Changing this creates a new volume.
- Source
Replica string The volume ID to replicate with.
- Source
Vol stringId The volume ID from which to create the volume. Changing this creates a new volume.
- Volume
Type string The type of volume to create. Changing this creates a new volume.
- attachments
Volume
V2Attachment[] 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 string The availability zone for the volume. Changing this creates a new volume.
- consistency
Group stringId The consistency group to place the volume in.
- description string
A description of the volume. Changing this updates the volume’s description.
- image
Id 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
regionargument of the provider is used. Changing this creates a new volume.- scheduler
Hints VolumeV2Scheduler Hint[] 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.
- snapshot
Id string The snapshot ID from which to create the volume. Changing this creates a new volume.
- source
Replica string The volume ID to replicate with.
- source
Vol stringId The volume ID from which to create the volume. Changing this creates a new volume.
- volume
Type string The type of volume to create. Changing this creates a new volume.
- attachments
List[Volume
V2Attachment] 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_ strid 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
regionargument of the provider is used. Changing this creates a new volume.- scheduler_
hints List[VolumeV2Scheduler Hint] 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_ strid 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.
VolumeV2SchedulerHint
- Additional
Properties Dictionary<string, object> Arbitrary key/value pairs of additional properties to pass to the scheduler.
- Different
Hosts List<string> The volume should be scheduled on a different host from the set of volumes specified in the list provided.
- Local
To stringInstance 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
JsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:- Same
Hosts List<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 map[string]interface{} Arbitrary key/value pairs of additional properties to pass to the scheduler.
- Different
Hosts []string The volume should be scheduled on a different host from the set of volumes specified in the list provided.
- Local
To stringInstance 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
JsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:- Same
Hosts []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 {[key: string]: any} Arbitrary key/value pairs of additional properties to pass to the scheduler.
- different
Hosts string[] The volume should be scheduled on a different host from the set of volumes specified in the list provided.
- local
To stringInstance 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
JsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:- same
Hosts 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 Dict[str, Any] Arbitrary key/value pairs of additional properties to pass to the scheduler.
- different
Hosts List[str] The volume should be scheduled on a different host from the set of volumes specified in the list provided.
- local
To strInstance 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
JsonFiltersyntax which is described here. At this time, only simple queries are supported. Compound queries usingand,or, ornotare not supported. An example of a simple query is:- same
Hosts 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
openstackTerraform Provider.