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
new VolumeAttachV2(name: string, args: VolumeAttachV2Args, opts?: CustomResourceOptions);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);func NewVolumeAttachV2(ctx *Context, name string, args VolumeAttachV2Args, opts ...ResourceOption) (*VolumeAttachV2, error)public VolumeAttachV2(string name, VolumeAttachV2Args args, CustomResourceOptions? opts = null)- 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:
- Host
Name string The host to attach the volume to.
- Volume
Id string The ID of the Volume to attach to an Instance.
- Attach
Mode string Specify whether to attach the volume as Read-Only (
ro) or Read-Write (rw). Only values ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- Initiator string
The iSCSI initiator string to make the connection.
- Ip
Address string The IP address of the
host_nameabove.- Multipath bool
Whether to connect to this volume via multipath.
- Os
Type 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
regionargument 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.
- Host
Name string The host to attach the volume to.
- Volume
Id string The ID of the Volume to attach to an Instance.
- Attach
Mode string Specify whether to attach the volume as Read-Only (
ro) or Read-Write (rw). Only values ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- Initiator string
The iSCSI initiator string to make the connection.
- Ip
Address string The IP address of the
host_nameabove.- Multipath bool
Whether to connect to this volume via multipath.
- Os
Type 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
regionargument 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 string The host to attach the volume to.
- volume
Id string The ID of the Volume to attach to an Instance.
- attach
Mode string Specify whether to attach the volume as Read-Only (
ro) or Read-Write (rw). Only values ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- initiator string
The iSCSI initiator string to make the connection.
- ip
Address string The IP address of the
host_nameabove.- multipath boolean
Whether to connect to this volume via multipath.
- os
Type 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
regionargument 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 ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor 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_nameabove.- 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
regionargument 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.
- Driver
Volume stringType The storage driver that the volume is based on.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mount
Point stringBase 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.
- Driver
Volume stringType The storage driver that the volume is based on.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mount
Point stringBase 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.
- driver
Volume stringType The storage driver that the volume is based on.
- id string
- The provider-assigned unique ID for this managed resource.
- mount
Point stringBase 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_ strtype The storage driver that the volume is based on.
- id str
- The provider-assigned unique ID for this managed resource.
- mount_
point_ strbase 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): VolumeAttachV2static 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:
- Attach
Mode string Specify whether to attach the volume as Read-Only (
ro) or Read-Write (rw). Only values ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- Driver
Volume stringType The storage driver that the volume is based on.
- Host
Name string The host to attach the volume to.
- Initiator string
The iSCSI initiator string to make the connection.
- Ip
Address string The IP address of the
host_nameabove.- Mount
Point stringBase A mount point base name for shared storage.
- Multipath bool
Whether to connect to this volume via multipath.
- Os
Type 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
regionargument of the provider is used. Changing this creates a new volume attachment.- Volume
Id 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.
- Attach
Mode string Specify whether to attach the volume as Read-Only (
ro) or Read-Write (rw). Only values ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- Driver
Volume stringType The storage driver that the volume is based on.
- Host
Name string The host to attach the volume to.
- Initiator string
The iSCSI initiator string to make the connection.
- Ip
Address string The IP address of the
host_nameabove.- Mount
Point stringBase A mount point base name for shared storage.
- Multipath bool
Whether to connect to this volume via multipath.
- Os
Type 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
regionargument of the provider is used. Changing this creates a new volume attachment.- Volume
Id 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 string Specify whether to attach the volume as Read-Only (
ro) or Read-Write (rw). Only values ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- driver
Volume stringType The storage driver that the volume is based on.
- host
Name string The host to attach the volume to.
- initiator string
The iSCSI initiator string to make the connection.
- ip
Address string The IP address of the
host_nameabove.- mount
Point stringBase A mount point base name for shared storage.
- multipath boolean
Whether to connect to this volume via multipath.
- os
Type 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
regionargument of the provider is used. Changing this creates a new volume attachment.- volume
Id 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 ofroandrware accepted. If left unspecified, the Block Storage API will apply a default ofrw.- 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
autoor a device such as/dev/vdc.- driver_
volume_ strtype 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_nameabove.- mount_
point_ strbase 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
regionargument 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
openstackTerraform Provider.