Class VolumeAttachV2


  • public class VolumeAttachV2
    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) 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. ## Example Usage ```java 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 com.pulumi.openstack.blockstorage.VolumeAttachV2; import com.pulumi.openstack.blockstorage.VolumeAttachV2Args; 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() .size(1) .build()); var va1 = new VolumeAttachV2("va1", VolumeAttachV2Args.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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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 VolumeAttachV2 get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VolumeAttachV2State 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>> instanceId()  
      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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VolumeAttachV2

        public VolumeAttachV2​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • VolumeAttachV2

        public VolumeAttachV2​(java.lang.String name,
                              VolumeAttachV2Args args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • VolumeAttachV2

        public VolumeAttachV2​(java.lang.String name,
                              VolumeAttachV2Args 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.
      • instanceId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceId()
      • 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 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

        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 VolumeAttachV2 get​(java.lang.String name,
                                         com.pulumi.core.Output<java.lang.String> id,
                                         @Nullable
                                         VolumeAttachV2State 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.