openstack.blockstorage.VolumeV2
Explore with Pulumi AI
Manages a V2 volume resource within OpenStack.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const volume1 = new openstack.blockstorage.VolumeV2("volume_1", {
region: "RegionOne",
name: "volume_1",
description: "first test volume",
size: 3,
});
import pulumi
import pulumi_openstack as openstack
volume1 = openstack.blockstorage.VolumeV2("volume_1",
region="RegionOne",
name="volume_1",
description="first test volume",
size=3)
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/blockstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blockstorage.NewVolumeV2(ctx, "volume_1", &blockstorage.VolumeV2Args{
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var volume1 = new OpenStack.BlockStorage.VolumeV2("volume_1", new()
{
Region = "RegionOne",
Name = "volume_1",
Description = "first test volume",
Size = 3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.blockstorage.VolumeV2;
import com.pulumi.openstack.blockstorage.VolumeV2Args;
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 VolumeV2("volume1", VolumeV2Args.builder()
.region("RegionOne")
.name("volume_1")
.description("first test volume")
.size(3)
.build());
}
}
resources:
volume1:
type: openstack:blockstorage:VolumeV2
name: volume_1
properties:
region: RegionOne
name: volume_1
description: first test volume
size: 3
Create VolumeV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VolumeV2(name: string, args: VolumeV2Args, opts?: CustomResourceOptions);
@overload
def VolumeV2(resource_name: str,
args: VolumeV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def VolumeV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
size: Optional[int] = None,
region: Optional[str] = None,
description: Optional[str] = None,
image_id: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
availability_zone: Optional[str] = None,
scheduler_hints: Optional[Sequence[VolumeV2SchedulerHintArgs]] = None,
consistency_group_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 NewVolumeV2(ctx *Context, name string, args VolumeV2Args, opts ...ResourceOption) (*VolumeV2, error)
public VolumeV2(string name, VolumeV2Args args, CustomResourceOptions? opts = null)
public VolumeV2(String name, VolumeV2Args args)
public VolumeV2(String name, VolumeV2Args args, CustomResourceOptions options)
type: openstack:blockstorage:VolumeV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args VolumeV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args VolumeV2Args
- 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 volumeV2Resource = new OpenStack.BlockStorage.VolumeV2("volumeV2Resource", new()
{
Size = 0,
Region = "string",
Description = "string",
ImageId = "string",
Metadata =
{
{ "string", "string" },
},
Name = "string",
AvailabilityZone = "string",
SchedulerHints = new[]
{
new OpenStack.BlockStorage.Inputs.VolumeV2SchedulerHintArgs
{
AdditionalProperties =
{
{ "string", "string" },
},
DifferentHosts = new[]
{
"string",
},
LocalToInstance = "string",
Query = "string",
SameHosts = new[]
{
"string",
},
},
},
ConsistencyGroupId = "string",
SnapshotId = "string",
SourceReplica = "string",
SourceVolId = "string",
VolumeType = "string",
});
example, err := blockstorage.NewVolumeV2(ctx, "volumeV2Resource", &blockstorage.VolumeV2Args{
Size: pulumi.Int(0),
Region: pulumi.String("string"),
Description: pulumi.String("string"),
ImageId: pulumi.String("string"),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
SchedulerHints: blockstorage.VolumeV2SchedulerHintArray{
&blockstorage.VolumeV2SchedulerHintArgs{
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"),
},
},
},
ConsistencyGroupId: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
SourceReplica: pulumi.String("string"),
SourceVolId: pulumi.String("string"),
VolumeType: pulumi.String("string"),
})
var volumeV2Resource = new VolumeV2("volumeV2Resource", VolumeV2Args.builder()
.size(0)
.region("string")
.description("string")
.imageId("string")
.metadata(Map.of("string", "string"))
.name("string")
.availabilityZone("string")
.schedulerHints(VolumeV2SchedulerHintArgs.builder()
.additionalProperties(Map.of("string", "string"))
.differentHosts("string")
.localToInstance("string")
.query("string")
.sameHosts("string")
.build())
.consistencyGroupId("string")
.snapshotId("string")
.sourceReplica("string")
.sourceVolId("string")
.volumeType("string")
.build());
volume_v2_resource = openstack.blockstorage.VolumeV2("volumeV2Resource",
size=0,
region="string",
description="string",
image_id="string",
metadata={
"string": "string",
},
name="string",
availability_zone="string",
scheduler_hints=[openstack.blockstorage.VolumeV2SchedulerHintArgs(
additional_properties={
"string": "string",
},
different_hosts=["string"],
local_to_instance="string",
query="string",
same_hosts=["string"],
)],
consistency_group_id="string",
snapshot_id="string",
source_replica="string",
source_vol_id="string",
volume_type="string")
const volumeV2Resource = new openstack.blockstorage.VolumeV2("volumeV2Resource", {
size: 0,
region: "string",
description: "string",
imageId: "string",
metadata: {
string: "string",
},
name: "string",
availabilityZone: "string",
schedulerHints: [{
additionalProperties: {
string: "string",
},
differentHosts: ["string"],
localToInstance: "string",
query: "string",
sameHosts: ["string"],
}],
consistencyGroupId: "string",
snapshotId: "string",
sourceReplica: "string",
sourceVolId: "string",
volumeType: "string",
});
type: openstack:blockstorage:VolumeV2
properties:
availabilityZone: string
consistencyGroupId: string
description: string
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
VolumeV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts 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, 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 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. - Scheduler
Hints List<Pulumi.Open Stack. Block Storage. Inputs. Volume V2Scheduler 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 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]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 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. - Scheduler
Hints []VolumeV2Scheduler 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 Integer
- 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,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 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. - 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 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]: 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 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. - 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 int
- 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 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 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[VolumeV2Scheduler 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 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.
- 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 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 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. - scheduler
Hints 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.
- 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.
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
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 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
Sequence[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.
- 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 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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
attachments: Optional[Sequence[VolumeV2AttachmentArgs]] = None,
availability_zone: Optional[str] = None,
consistency_group_id: Optional[str] = None,
description: Optional[str] = None,
image_id: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
region: Optional[str] = None,
scheduler_hints: Optional[Sequence[VolumeV2SchedulerHintArgs]] = 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) -> VolumeV2
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)
public static VolumeV2 get(String name, Output<String> id, VolumeV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Attachments
List<Pulumi.
Open Stack. Block Storage. Inputs. 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 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 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. - Scheduler
Hints List<Pulumi.Open Stack. Block Storage. Inputs. Volume V2Scheduler 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 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 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 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. - Scheduler
Hints []VolumeV2Scheduler 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
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 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,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 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. - 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 Integer
- 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]: 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 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. - 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
Sequence[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 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 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 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[VolumeV2Scheduler 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 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.
- 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.
- 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>
- 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. - scheduler
Hints 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). 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.
Supporting Types
VolumeV2Attachment, VolumeV2AttachmentArgs
- Device string
- Id string
- Instance
Id string
- Device string
- Id string
- Instance
Id string
- device String
- id String
- instance
Id String
- device string
- id string
- instance
Id string
- device str
- id str
- instance_
id str
- device String
- id String
- instance
Id String
VolumeV2SchedulerHint, VolumeV2SchedulerHintArgs
- Additional
Properties Dictionary<string, string> - 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
JsonFilter
syntax which is described here. At this time, only simple queries are supported. Compound queries usingand
,or
, ornot
are not supported. An example of a simple query is:[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
- 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]string - 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
JsonFilter
syntax which is described here. At this time, only simple queries are supported. Compound queries usingand
,or
, ornot
are not supported. An example of a simple query is:[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
- 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 Map<String,String> - 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
JsonFilter
syntax which is described here. At this time, only simple queries are supported. Compound queries usingand
,or
, ornot
are not supported. An example of a simple query is:[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
- 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 {[key: string]: string} - 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
JsonFilter
syntax which is described here. At this time, only simple queries are supported. Compound queries usingand
,or
, ornot
are not supported. An example of a simple query is:[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
- 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 Mapping[str, str] - Arbitrary key/value pairs of additional properties to pass to the scheduler.
- different_
hosts Sequence[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
JsonFilter
syntax which is described here. At this time, only simple queries are supported. Compound queries usingand
,or
, ornot
are not supported. An example of a simple query is:[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
- same_
hosts Sequence[str] - 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> - 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
JsonFilter
syntax which is described here. At this time, only simple queries are supported. Compound queries usingand
,or
, ornot
are not supported. An example of a simple query is:[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
- 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.
Import
Volumes can be imported using the id
, e.g.
$ pulumi import openstack:blockstorage/volumeV2:VolumeV2 volume_1 ea257959-eeb1-4c10-8d33-26f0409a755d
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.