Class VolumeAttach
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.blockstorage.VolumeAttach
-
public class VolumeAttach extends com.pulumi.resources.CustomResource> **Note:** This resource usually requires admin privileges. > **Note:** This resource does not actually attach a volume to an instance. Please use the `openstack.compute.VolumeAttach` resource for that. > **Note:** All arguments including the `data` computed attribute will be stored in the raw state as plain-text. Read more about sensitive data in state. Creates a general purpose attachment connection to a Block Storage volume using the OpenStack Block Storage (Cinder) v3 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. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.blockstorage.Volume; import com.pulumi.openstack.blockstorage.VolumeArgs; import com.pulumi.openstack.blockstorage.VolumeAttach; import com.pulumi.openstack.blockstorage.VolumeAttachArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var volume1 = new Volume("volume1", VolumeArgs.builder() .size(1) .build()); var va1 = new VolumeAttach("va1", VolumeAttachArgs.builder() .volumeId(volume1.id()) .device("auto") .hostName("devstack") .ipAddress("192.168.255.10") .initiator("iqn.1993-08.org.debian:01:e9861fb1859") .osType("linux2") .platform("x86_64") .build()); } } ``` ## Import It is not possible to import this resource.
-
-
Constructor Summary
Constructors Constructor Description VolumeAttach(java.lang.String name)VolumeAttach(java.lang.String name, VolumeAttachArgs args)VolumeAttach(java.lang.String name, VolumeAttachArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.String>>attachMode()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>data()com.pulumi.core.Output<java.util.Optional<java.lang.String>>device()com.pulumi.core.Output<java.lang.String>driverVolumeType()static VolumeAttachget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VolumeAttachState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>hostName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>initiator()com.pulumi.core.Output<java.util.Optional<java.lang.String>>ipAddress()com.pulumi.core.Output<java.lang.String>mountPointBase()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>multipath()com.pulumi.core.Output<java.util.Optional<java.lang.String>>osType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>platform()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>volumeId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>wwnn()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>wwpns()
-
-
-
Constructor Detail
-
VolumeAttach
public VolumeAttach(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
VolumeAttach
public VolumeAttach(java.lang.String name, VolumeAttachArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
VolumeAttach
public VolumeAttach(java.lang.String name, VolumeAttachArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
attachMode
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> attachMode()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> data()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> device()
- Returns:
- 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
public com.pulumi.core.Output<java.lang.String> driverVolumeType()
- Returns:
- The storage driver that the volume is based on.
-
hostName
public com.pulumi.core.Output<java.lang.String> hostName()
- Returns:
- The host to attach the volume to.
-
initiator
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> initiator()
- Returns:
- The iSCSI initiator string to make the connection.
-
ipAddress
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ipAddress()
- Returns:
- The IP address of the `host_name` above.
-
mountPointBase
public com.pulumi.core.Output<java.lang.String> mountPointBase()
- Returns:
- A mount point base name for shared storage.
-
multipath
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> multipath()
- Returns:
- Whether to connect to this volume via multipath.
-
osType
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> osType()
- Returns:
- The iSCSI initiator OS type.
-
platform
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> platform()
- Returns:
- The iSCSI initiator platform.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region in which to obtain the V3 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
public com.pulumi.core.Output<java.lang.String> volumeId()
- Returns:
- The ID of the Volume to attach to an Instance.
-
wwnn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> wwnn()
- Returns:
- A wwnn name. Used for Fibre Channel connections.
-
wwpns
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> wwpns()
- Returns:
- An array of wwpn strings. Used for Fibre Channel connections.
-
get
public static VolumeAttach get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VolumeAttachState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-