1. Packages
  2. Openstack Provider
  3. API Docs
  4. compute
  5. VolumeAttach
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.compute.VolumeAttach

Explore with Pulumi AI

Attaches a Block Storage Volume to an Instance using the OpenStack Compute (Nova) v2 API.

Example Usage

Basic attachment of a single volume to a single instance

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const volume1 = new openstack.blockstorage.Volume("volume_1", {
    name: "volume_1",
    size: 1,
});
const instance1 = new openstack.compute.Instance("instance_1", {
    name: "instance_1",
    securityGroups: ["default"],
});
const va1 = new openstack.compute.VolumeAttach("va_1", {
    instanceId: instance1.id,
    volumeId: volume1.id,
});
Copy
import pulumi
import pulumi_openstack as openstack

volume1 = openstack.blockstorage.Volume("volume_1",
    name="volume_1",
    size=1)
instance1 = openstack.compute.Instance("instance_1",
    name="instance_1",
    security_groups=["default"])
va1 = openstack.compute.VolumeAttach("va_1",
    instance_id=instance1.id,
    volume_id=volume1.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/blockstorage"
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		volume1, err := blockstorage.NewVolume(ctx, "volume_1", &blockstorage.VolumeArgs{
			Name: pulumi.String("volume_1"),
			Size: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		instance1, err := compute.NewInstance(ctx, "instance_1", &compute.InstanceArgs{
			Name: pulumi.String("instance_1"),
			SecurityGroups: pulumi.StringArray{
				pulumi.String("default"),
			},
		})
		if err != nil {
			return err
		}
		_, err = compute.NewVolumeAttach(ctx, "va_1", &compute.VolumeAttachArgs{
			InstanceId: instance1.ID(),
			VolumeId:   volume1.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var volume1 = new OpenStack.BlockStorage.Volume("volume_1", new()
    {
        Name = "volume_1",
        Size = 1,
    });

    var instance1 = new OpenStack.Compute.Instance("instance_1", new()
    {
        Name = "instance_1",
        SecurityGroups = new[]
        {
            "default",
        },
    });

    var va1 = new OpenStack.Compute.VolumeAttach("va_1", new()
    {
        InstanceId = instance1.Id,
        VolumeId = volume1.Id,
    });

});
Copy
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.compute.Instance;
import com.pulumi.openstack.compute.InstanceArgs;
import com.pulumi.openstack.compute.VolumeAttach;
import com.pulumi.openstack.compute.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()
            .name("volume_1")
            .size(1)
            .build());

        var instance1 = new Instance("instance1", InstanceArgs.builder()
            .name("instance_1")
            .securityGroups("default")
            .build());

        var va1 = new VolumeAttach("va1", VolumeAttachArgs.builder()
            .instanceId(instance1.id())
            .volumeId(volume1.id())
            .build());

    }
}
Copy
resources:
  volume1:
    type: openstack:blockstorage:Volume
    name: volume_1
    properties:
      name: volume_1
      size: 1
  instance1:
    type: openstack:compute:Instance
    name: instance_1
    properties:
      name: instance_1
      securityGroups:
        - default
  va1:
    type: openstack:compute:VolumeAttach
    name: va_1
    properties:
      instanceId: ${instance1.id}
      volumeId: ${volume1.id}
Copy

Using Multiattach-enabled volumes

Multiattach Volumes are dependent upon your OpenStack cloud and not all clouds support multiattach. Multiattach volumes require a volume_type that has multiattach enabled.

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const volume1 = new openstack.blockstorage.Volume("volume_1", {
    name: "volume_1",
    size: 1,
    volumeType: "multiattach",
});
const instance1 = new openstack.compute.Instance("instance_1", {
    name: "instance_1",
    securityGroups: ["default"],
});
const instance2 = new openstack.compute.Instance("instance_2", {
    name: "instance_2",
    securityGroups: ["default"],
});
const va1 = new openstack.compute.VolumeAttach("va_1", {
    instanceId: instance1.id,
    volumeId: volume1.id,
    multiattach: true,
});
const va2 = new openstack.compute.VolumeAttach("va_2", {
    instanceId: instance2.id,
    volumeId: volume1.id,
    multiattach: true,
}, {
    dependsOn: [va1],
});
Copy
import pulumi
import pulumi_openstack as openstack

volume1 = openstack.blockstorage.Volume("volume_1",
    name="volume_1",
    size=1,
    volume_type="multiattach")
instance1 = openstack.compute.Instance("instance_1",
    name="instance_1",
    security_groups=["default"])
instance2 = openstack.compute.Instance("instance_2",
    name="instance_2",
    security_groups=["default"])
va1 = openstack.compute.VolumeAttach("va_1",
    instance_id=instance1.id,
    volume_id=volume1.id,
    multiattach=True)
va2 = openstack.compute.VolumeAttach("va_2",
    instance_id=instance2.id,
    volume_id=volume1.id,
    multiattach=True,
    opts = pulumi.ResourceOptions(depends_on=[va1]))
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/blockstorage"
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		volume1, err := blockstorage.NewVolume(ctx, "volume_1", &blockstorage.VolumeArgs{
			Name:       pulumi.String("volume_1"),
			Size:       pulumi.Int(1),
			VolumeType: pulumi.String("multiattach"),
		})
		if err != nil {
			return err
		}
		instance1, err := compute.NewInstance(ctx, "instance_1", &compute.InstanceArgs{
			Name: pulumi.String("instance_1"),
			SecurityGroups: pulumi.StringArray{
				pulumi.String("default"),
			},
		})
		if err != nil {
			return err
		}
		instance2, err := compute.NewInstance(ctx, "instance_2", &compute.InstanceArgs{
			Name: pulumi.String("instance_2"),
			SecurityGroups: pulumi.StringArray{
				pulumi.String("default"),
			},
		})
		if err != nil {
			return err
		}
		va1, err := compute.NewVolumeAttach(ctx, "va_1", &compute.VolumeAttachArgs{
			InstanceId:  instance1.ID(),
			VolumeId:    volume1.ID(),
			Multiattach: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewVolumeAttach(ctx, "va_2", &compute.VolumeAttachArgs{
			InstanceId:  instance2.ID(),
			VolumeId:    volume1.ID(),
			Multiattach: pulumi.Bool(true),
		}, pulumi.DependsOn([]pulumi.Resource{
			va1,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var volume1 = new OpenStack.BlockStorage.Volume("volume_1", new()
    {
        Name = "volume_1",
        Size = 1,
        VolumeType = "multiattach",
    });

    var instance1 = new OpenStack.Compute.Instance("instance_1", new()
    {
        Name = "instance_1",
        SecurityGroups = new[]
        {
            "default",
        },
    });

    var instance2 = new OpenStack.Compute.Instance("instance_2", new()
    {
        Name = "instance_2",
        SecurityGroups = new[]
        {
            "default",
        },
    });

    var va1 = new OpenStack.Compute.VolumeAttach("va_1", new()
    {
        InstanceId = instance1.Id,
        VolumeId = volume1.Id,
        Multiattach = true,
    });

    var va2 = new OpenStack.Compute.VolumeAttach("va_2", new()
    {
        InstanceId = instance2.Id,
        VolumeId = volume1.Id,
        Multiattach = true,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            va1,
        },
    });

});
Copy
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.compute.Instance;
import com.pulumi.openstack.compute.InstanceArgs;
import com.pulumi.openstack.compute.VolumeAttach;
import com.pulumi.openstack.compute.VolumeAttachArgs;
import com.pulumi.resources.CustomResourceOptions;
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()
            .name("volume_1")
            .size(1)
            .volumeType("multiattach")
            .build());

        var instance1 = new Instance("instance1", InstanceArgs.builder()
            .name("instance_1")
            .securityGroups("default")
            .build());

        var instance2 = new Instance("instance2", InstanceArgs.builder()
            .name("instance_2")
            .securityGroups("default")
            .build());

        var va1 = new VolumeAttach("va1", VolumeAttachArgs.builder()
            .instanceId(instance1.id())
            .volumeId(volume1.id())
            .multiattach(true)
            .build());

        var va2 = new VolumeAttach("va2", VolumeAttachArgs.builder()
            .instanceId(instance2.id())
            .volumeId(volume1.id())
            .multiattach(true)
            .build(), CustomResourceOptions.builder()
                .dependsOn(va1)
                .build());

    }
}
Copy
resources:
  volume1:
    type: openstack:blockstorage:Volume
    name: volume_1
    properties:
      name: volume_1
      size: 1
      volumeType: multiattach
  instance1:
    type: openstack:compute:Instance
    name: instance_1
    properties:
      name: instance_1
      securityGroups:
        - default
  instance2:
    type: openstack:compute:Instance
    name: instance_2
    properties:
      name: instance_2
      securityGroups:
        - default
  va1:
    type: openstack:compute:VolumeAttach
    name: va_1
    properties:
      instanceId: ${instance1.id}
      volumeId: ${volume1.id}
      multiattach: true
  va2:
    type: openstack:compute:VolumeAttach
    name: va_2
    properties:
      instanceId: ${instance2.id}
      volumeId: ${volume1.id}
      multiattach: true
    options:
      dependsOn:
        - ${va1}
Copy

It is recommended to use depends_on for the attach resources to enforce the volume attachments to happen one at a time.

Create VolumeAttach Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VolumeAttach(name: string, args: VolumeAttachArgs, opts?: CustomResourceOptions);
@overload
def VolumeAttach(resource_name: str,
                 args: VolumeAttachArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def VolumeAttach(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 instance_id: Optional[str] = None,
                 volume_id: Optional[str] = None,
                 device: Optional[str] = None,
                 multiattach: Optional[bool] = None,
                 region: Optional[str] = None,
                 tag: Optional[str] = None,
                 vendor_options: Optional[VolumeAttachVendorOptionsArgs] = None)
func NewVolumeAttach(ctx *Context, name string, args VolumeAttachArgs, opts ...ResourceOption) (*VolumeAttach, error)
public VolumeAttach(string name, VolumeAttachArgs args, CustomResourceOptions? opts = null)
public VolumeAttach(String name, VolumeAttachArgs args)
public VolumeAttach(String name, VolumeAttachArgs args, CustomResourceOptions options)
type: openstack:compute:VolumeAttach
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VolumeAttachArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VolumeAttachArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VolumeAttachArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VolumeAttachArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VolumeAttachArgs
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 openstackVolumeAttachResource = new OpenStack.Compute.VolumeAttach("openstackVolumeAttachResource", new()
{
    InstanceId = "string",
    VolumeId = "string",
    Device = "string",
    Multiattach = false,
    Region = "string",
    Tag = "string",
    VendorOptions = new OpenStack.Compute.Inputs.VolumeAttachVendorOptionsArgs
    {
        IgnoreVolumeConfirmation = false,
    },
});
Copy
example, err := compute.NewVolumeAttach(ctx, "openstackVolumeAttachResource", &compute.VolumeAttachArgs{
	InstanceId:  pulumi.String("string"),
	VolumeId:    pulumi.String("string"),
	Device:      pulumi.String("string"),
	Multiattach: pulumi.Bool(false),
	Region:      pulumi.String("string"),
	Tag:         pulumi.String("string"),
	VendorOptions: &compute.VolumeAttachVendorOptionsArgs{
		IgnoreVolumeConfirmation: pulumi.Bool(false),
	},
})
Copy
var openstackVolumeAttachResource = new VolumeAttach("openstackVolumeAttachResource", VolumeAttachArgs.builder()
    .instanceId("string")
    .volumeId("string")
    .device("string")
    .multiattach(false)
    .region("string")
    .tag("string")
    .vendorOptions(VolumeAttachVendorOptionsArgs.builder()
        .ignoreVolumeConfirmation(false)
        .build())
    .build());
Copy
openstack_volume_attach_resource = openstack.compute.VolumeAttach("openstackVolumeAttachResource",
    instance_id="string",
    volume_id="string",
    device="string",
    multiattach=False,
    region="string",
    tag="string",
    vendor_options={
        "ignore_volume_confirmation": False,
    })
Copy
const openstackVolumeAttachResource = new openstack.compute.VolumeAttach("openstackVolumeAttachResource", {
    instanceId: "string",
    volumeId: "string",
    device: "string",
    multiattach: false,
    region: "string",
    tag: "string",
    vendorOptions: {
        ignoreVolumeConfirmation: false,
    },
});
Copy
type: openstack:compute:VolumeAttach
properties:
    device: string
    instanceId: string
    multiattach: false
    region: string
    tag: string
    vendorOptions:
        ignoreVolumeConfirmation: false
    volumeId: string
Copy

VolumeAttach Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VolumeAttach resource accepts the following input properties:

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Instance to attach the Volume to.
VolumeId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Volume to attach to an Instance.
Device string
Multiattach Changes to this property will trigger replacement. bool
Enable attachment of multiattach-capable volumes.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. A Compute 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.
Tag Changes to this property will trigger replacement. string
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
VendorOptions Changes to this property will trigger replacement. Pulumi.OpenStack.Compute.Inputs.VolumeAttachVendorOptions
Map of additional vendor-specific options. Supported options are described below.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Instance to attach the Volume to.
VolumeId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Volume to attach to an Instance.
Device string
Multiattach Changes to this property will trigger replacement. bool
Enable attachment of multiattach-capable volumes.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. A Compute 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.
Tag Changes to this property will trigger replacement. string
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
VendorOptions Changes to this property will trigger replacement. VolumeAttachVendorOptionsArgs
Map of additional vendor-specific options. Supported options are described below.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Instance to attach the Volume to.
volumeId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Volume to attach to an Instance.
device String
multiattach Changes to this property will trigger replacement. Boolean
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. String
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendorOptions Changes to this property will trigger replacement. VolumeAttachVendorOptions
Map of additional vendor-specific options. Supported options are described below.
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Instance to attach the Volume to.
volumeId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Volume to attach to an Instance.
device string
multiattach Changes to this property will trigger replacement. boolean
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. string
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendorOptions Changes to this property will trigger replacement. VolumeAttachVendorOptions
Map of additional vendor-specific options. Supported options are described below.
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Instance to attach the Volume to.
volume_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Volume to attach to an Instance.
device str
multiattach Changes to this property will trigger replacement. bool
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. str
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. str
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendor_options Changes to this property will trigger replacement. VolumeAttachVendorOptionsArgs
Map of additional vendor-specific options. Supported options are described below.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Instance to attach the Volume to.
volumeId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Volume to attach to an Instance.
device String
multiattach Changes to this property will trigger replacement. Boolean
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. String
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendorOptions Changes to this property will trigger replacement. Property Map
Map of additional vendor-specific options. Supported options are described below.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing VolumeAttach Resource

Get an existing VolumeAttach 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?: VolumeAttachState, opts?: CustomResourceOptions): VolumeAttach
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        device: Optional[str] = None,
        instance_id: Optional[str] = None,
        multiattach: Optional[bool] = None,
        region: Optional[str] = None,
        tag: Optional[str] = None,
        vendor_options: Optional[VolumeAttachVendorOptionsArgs] = None,
        volume_id: Optional[str] = None) -> VolumeAttach
func GetVolumeAttach(ctx *Context, name string, id IDInput, state *VolumeAttachState, opts ...ResourceOption) (*VolumeAttach, error)
public static VolumeAttach Get(string name, Input<string> id, VolumeAttachState? state, CustomResourceOptions? opts = null)
public static VolumeAttach get(String name, Output<String> id, VolumeAttachState state, CustomResourceOptions options)
resources:  _:    type: openstack:compute:VolumeAttach    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Device string
InstanceId Changes to this property will trigger replacement. string
The ID of the Instance to attach the Volume to.
Multiattach Changes to this property will trigger replacement. bool
Enable attachment of multiattach-capable volumes.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. A Compute 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.
Tag Changes to this property will trigger replacement. string
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
VendorOptions Changes to this property will trigger replacement. Pulumi.OpenStack.Compute.Inputs.VolumeAttachVendorOptions
Map of additional vendor-specific options. Supported options are described below.
VolumeId Changes to this property will trigger replacement. string
The ID of the Volume to attach to an Instance.
Device string
InstanceId Changes to this property will trigger replacement. string
The ID of the Instance to attach the Volume to.
Multiattach Changes to this property will trigger replacement. bool
Enable attachment of multiattach-capable volumes.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. A Compute 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.
Tag Changes to this property will trigger replacement. string
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
VendorOptions Changes to this property will trigger replacement. VolumeAttachVendorOptionsArgs
Map of additional vendor-specific options. Supported options are described below.
VolumeId Changes to this property will trigger replacement. string
The ID of the Volume to attach to an Instance.
device String
instanceId Changes to this property will trigger replacement. String
The ID of the Instance to attach the Volume to.
multiattach Changes to this property will trigger replacement. Boolean
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. String
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendorOptions Changes to this property will trigger replacement. VolumeAttachVendorOptions
Map of additional vendor-specific options. Supported options are described below.
volumeId Changes to this property will trigger replacement. String
The ID of the Volume to attach to an Instance.
device string
instanceId Changes to this property will trigger replacement. string
The ID of the Instance to attach the Volume to.
multiattach Changes to this property will trigger replacement. boolean
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. string
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendorOptions Changes to this property will trigger replacement. VolumeAttachVendorOptions
Map of additional vendor-specific options. Supported options are described below.
volumeId Changes to this property will trigger replacement. string
The ID of the Volume to attach to an Instance.
device str
instance_id Changes to this property will trigger replacement. str
The ID of the Instance to attach the Volume to.
multiattach Changes to this property will trigger replacement. bool
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. str
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. str
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendor_options Changes to this property will trigger replacement. VolumeAttachVendorOptionsArgs
Map of additional vendor-specific options. Supported options are described below.
volume_id Changes to this property will trigger replacement. str
The ID of the Volume to attach to an Instance.
device String
instanceId Changes to this property will trigger replacement. String
The ID of the Instance to attach the Volume to.
multiattach Changes to this property will trigger replacement. Boolean
Enable attachment of multiattach-capable volumes.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. A Compute 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.
tag Changes to this property will trigger replacement. String
Add a device role tag that is applied to the volume when attaching it to the VM. Changing this creates a new volume attachment with the new tag. Requires microversion >= 2.49.
vendorOptions Changes to this property will trigger replacement. Property Map
Map of additional vendor-specific options. Supported options are described below.
volumeId Changes to this property will trigger replacement. String
The ID of the Volume to attach to an Instance.

Supporting Types

VolumeAttachVendorOptions
, VolumeAttachVendorOptionsArgs

IgnoreVolumeConfirmation bool
Boolean to control whether to ignore volume status confirmation of the attached volume. This can be helpful to work with some OpenStack clouds which don't have the Block Storage V3 API available.
IgnoreVolumeConfirmation bool
Boolean to control whether to ignore volume status confirmation of the attached volume. This can be helpful to work with some OpenStack clouds which don't have the Block Storage V3 API available.
ignoreVolumeConfirmation Boolean
Boolean to control whether to ignore volume status confirmation of the attached volume. This can be helpful to work with some OpenStack clouds which don't have the Block Storage V3 API available.
ignoreVolumeConfirmation boolean
Boolean to control whether to ignore volume status confirmation of the attached volume. This can be helpful to work with some OpenStack clouds which don't have the Block Storage V3 API available.
ignore_volume_confirmation bool
Boolean to control whether to ignore volume status confirmation of the attached volume. This can be helpful to work with some OpenStack clouds which don't have the Block Storage V3 API available.
ignoreVolumeConfirmation Boolean
Boolean to control whether to ignore volume status confirmation of the attached volume. This can be helpful to work with some OpenStack clouds which don't have the Block Storage V3 API available.

Import

Volume Attachments can be imported using the Instance ID and Volume ID separated by a slash, e.g.

$ pulumi import openstack:compute/volumeAttach:VolumeAttach va_1 89c60255-9bd6-460c-822a-e2b959ede9d2/45670584-225f-46c3-b33e-6707b589b666
Copy

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.