VolumeAttachV2

This resource is experimental and may be removed in the future! Feedback is requested if you find this resource useful or if you find any problems with it.

Creates a general purpose attachment connection to a Block Storage volume using the OpenStack Block Storage (Cinder) v2 API. Depending on your Block Storage service configuration, this resource can assist in attaching a volume to a non-OpenStack resource such as a bare-metal server or a remote virtual machine in a different cloud provider.

This does not actually attach a volume to an instance. Please use the openstack.compute.VolumeAttach resource for that.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var volume1 = new OpenStack.BlockStorage.VolumeV2("volume1", new OpenStack.BlockStorage.VolumeV2Args
        {
            Size = 1,
        });
        var va1 = new OpenStack.BlockStorage.VolumeAttachV2("va1", new OpenStack.BlockStorage.VolumeAttachV2Args
        {
            Device = "auto",
            HostName = "devstack",
            Initiator = "iqn.1993-08.org.debian:01:e9861fb1859",
            IpAddress = "192.168.255.10",
            OsType = "linux2",
            Platform = "x86_64",
            VolumeId = volume1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

volume1 = openstack.blockstorage.VolumeV2("volume1", size=1)
va1 = openstack.blockstorage.VolumeAttachV2("va1",
    device="auto",
    host_name="devstack",
    initiator="iqn.1993-08.org.debian:01:e9861fb1859",
    ip_address="192.168.255.10",
    os_type="linux2",
    platform="x86_64",
    volume_id=volume1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const volume1 = new openstack.blockstorage.VolumeV2("volume_1", {
    size: 1,
});
const va1 = new openstack.blockstorage.VolumeAttachV2("va_1", {
    device: "auto",
    hostName: "devstack",
    initiator: "iqn.1993-08.org.debian:01:e9861fb1859",
    ipAddress: "192.168.255.10",
    osType: "linux2",
    platform: "x86_64",
    volumeId: volume1.id,
});

Create a VolumeAttachV2 Resource

def VolumeAttachV2(resource_name, opts=None, attach_mode=None, device=None, host_name=None, initiator=None, ip_address=None, multipath=None, os_type=None, platform=None, region=None, volume_id=None, wwnn=None, wwpns=None, __props__=None);
name string
The unique name of the resource.
args VolumeAttachV2Args
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 VolumeAttachV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VolumeAttachV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VolumeAttachV2 Resource Properties

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

Inputs

The VolumeAttachV2 resource accepts the following input properties:

HostName string

The host to attach the volume to.

VolumeId string

The ID of the Volume to attach to an Instance.

AttachMode string

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

Device string

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

Initiator string

The iSCSI initiator string to make the connection.

IpAddress string

The IP address of the host_name above.

Multipath bool

Whether to connect to this volume via multipath.

OsType string

The iSCSI initiator OS type.

Platform string

The iSCSI initiator platform.

Region string

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

Wwnn string

A wwnn name. Used for Fibre Channel connections.

Wwpns List<string>

An array of wwpn strings. Used for Fibre Channel connections.

HostName string

The host to attach the volume to.

VolumeId string

The ID of the Volume to attach to an Instance.

AttachMode string

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

Device string

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

Initiator string

The iSCSI initiator string to make the connection.

IpAddress string

The IP address of the host_name above.

Multipath bool

Whether to connect to this volume via multipath.

OsType string

The iSCSI initiator OS type.

Platform string

The iSCSI initiator platform.

Region string

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

Wwnn string

A wwnn name. Used for Fibre Channel connections.

Wwpns []string

An array of wwpn strings. Used for Fibre Channel connections.

hostName string

The host to attach the volume to.

volumeId string

The ID of the Volume to attach to an Instance.

attachMode string

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

device string

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

initiator string

The iSCSI initiator string to make the connection.

ipAddress string

The IP address of the host_name above.

multipath boolean

Whether to connect to this volume via multipath.

osType string

The iSCSI initiator OS type.

platform string

The iSCSI initiator platform.

region string

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

wwnn string

A wwnn name. Used for Fibre Channel connections.

wwpns string[]

An array of wwpn strings. Used for Fibre Channel connections.

host_name str

The host to attach the volume to.

volume_id str

The ID of the Volume to attach to an Instance.

attach_mode str

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

device str

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

initiator str

The iSCSI initiator string to make the connection.

ip_address str

The IP address of the host_name above.

multipath bool

Whether to connect to this volume via multipath.

os_type str

The iSCSI initiator OS type.

platform str

The iSCSI initiator platform.

region str

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

wwnn str

A wwnn name. Used for Fibre Channel connections.

wwpns List[str]

An array of wwpn strings. Used for Fibre Channel connections.

Outputs

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

Data Dictionary<string, object>

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

DriverVolumeType string

The storage driver that the volume is based on.

Id string
The provider-assigned unique ID for this managed resource.
MountPointBase string

A mount point base name for shared storage.

Data map[string]interface{}

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

DriverVolumeType string

The storage driver that the volume is based on.

Id string
The provider-assigned unique ID for this managed resource.
MountPointBase string

A mount point base name for shared storage.

data {[key: string]: any}

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

driverVolumeType string

The storage driver that the volume is based on.

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

A mount point base name for shared storage.

data Dict[str, Any]

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

driver_volume_type str

The storage driver that the volume is based on.

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

A mount point base name for shared storage.

Look up an Existing VolumeAttachV2 Resource

Get an existing VolumeAttachV2 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?: VolumeAttachV2State, opts?: CustomResourceOptions): VolumeAttachV2
static get(resource_name, id, opts=None, attach_mode=None, data=None, device=None, driver_volume_type=None, host_name=None, initiator=None, ip_address=None, mount_point_base=None, multipath=None, os_type=None, platform=None, region=None, volume_id=None, wwnn=None, wwpns=None, __props__=None);
func GetVolumeAttachV2(ctx *Context, name string, id IDInput, state *VolumeAttachV2State, opts ...ResourceOption) (*VolumeAttachV2, error)
public static VolumeAttachV2 Get(string name, Input<string> id, VolumeAttachV2State? 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:

AttachMode string

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

Data Dictionary<string, object>

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

Device string

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

DriverVolumeType string

The storage driver that the volume is based on.

HostName string

The host to attach the volume to.

Initiator string

The iSCSI initiator string to make the connection.

IpAddress string

The IP address of the host_name above.

MountPointBase string

A mount point base name for shared storage.

Multipath bool

Whether to connect to this volume via multipath.

OsType string

The iSCSI initiator OS type.

Platform string

The iSCSI initiator platform.

Region string

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

VolumeId string

The ID of the Volume to attach to an Instance.

Wwnn string

A wwnn name. Used for Fibre Channel connections.

Wwpns List<string>

An array of wwpn strings. Used for Fibre Channel connections.

AttachMode string

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

Data map[string]interface{}

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

Device string

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

DriverVolumeType string

The storage driver that the volume is based on.

HostName string

The host to attach the volume to.

Initiator string

The iSCSI initiator string to make the connection.

IpAddress string

The IP address of the host_name above.

MountPointBase string

A mount point base name for shared storage.

Multipath bool

Whether to connect to this volume via multipath.

OsType string

The iSCSI initiator OS type.

Platform string

The iSCSI initiator platform.

Region string

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

VolumeId string

The ID of the Volume to attach to an Instance.

Wwnn string

A wwnn name. Used for Fibre Channel connections.

Wwpns []string

An array of wwpn strings. Used for Fibre Channel connections.

attachMode string

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

data {[key: string]: any}

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

device string

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

driverVolumeType string

The storage driver that the volume is based on.

hostName string

The host to attach the volume to.

initiator string

The iSCSI initiator string to make the connection.

ipAddress string

The IP address of the host_name above.

mountPointBase string

A mount point base name for shared storage.

multipath boolean

Whether to connect to this volume via multipath.

osType string

The iSCSI initiator OS type.

platform string

The iSCSI initiator platform.

region string

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

volumeId string

The ID of the Volume to attach to an Instance.

wwnn string

A wwnn name. Used for Fibre Channel connections.

wwpns string[]

An array of wwpn strings. Used for Fibre Channel connections.

attach_mode str

Specify whether to attach the volume as Read-Only (ro) or Read-Write (rw). Only values of ro and rw are accepted. If left unspecified, the Block Storage API will apply a default of rw.

data Dict[str, Any]

This is a map of key/value pairs that contain the connection information. You will want to pass this information to a provisioner script to finalize the connection. See below for more information.

device str

The device to tell the Block Storage service this volume will be attached as. This is purely for informational purposes. You can specify auto or a device such as /dev/vdc.

driver_volume_type str

The storage driver that the volume is based on.

host_name str

The host to attach the volume to.

initiator str

The iSCSI initiator string to make the connection.

ip_address str

The IP address of the host_name above.

mount_point_base str

A mount point base name for shared storage.

multipath bool

Whether to connect to this volume via multipath.

os_type str

The iSCSI initiator OS type.

platform str

The iSCSI initiator platform.

region str

The region in which to obtain the V2 Block Storage client. A Block Storage client is needed to create a volume attachment. If omitted, the region argument of the provider is used. Changing this creates a new volume attachment.

volume_id str

The ID of the Volume to attach to an Instance.

wwnn str

A wwnn name. Used for Fibre Channel connections.

wwpns List[str]

An array of wwpn strings. Used for Fibre Channel connections.

Package Details

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