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,
});
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)
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/blockstorage"
"github.com/pulumi/pulumi-openstack/sdk/v4/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
})
}
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,
});
});
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());
}
}
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}
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],
});
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]))
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/blockstorage"
"github.com/pulumi/pulumi-openstack/sdk/v4/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
})
}
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,
},
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args VolumeAttachArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args VolumeAttachArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VolumeAttachArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
},
});
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),
},
})
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());
openstack_volume_attach_resource = openstack.compute.VolumeAttach("openstackVolumeAttachResource",
instance_id="string",
volume_id="string",
device="string",
multiattach=False,
region="string",
tag="string",
vendor_options=openstack.compute.VolumeAttachVendorOptionsArgs(
ignore_volume_confirmation=False,
))
const openstackVolumeAttachResource = new openstack.compute.VolumeAttach("openstackVolumeAttachResource", {
instanceId: "string",
volumeId: "string",
device: "string",
multiattach: false,
region: "string",
tag: "string",
vendorOptions: {
ignoreVolumeConfirmation: false,
},
});
type: openstack:compute:VolumeAttach
properties:
device: string
instanceId: string
multiattach: false
region: string
tag: string
vendorOptions:
ignoreVolumeConfirmation: false
volumeId: string
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
The VolumeAttach resource accepts the following input properties:
- Instance
Id string - The ID of the Instance to attach the Volume to.
- Volume
Id string - The ID of the Volume to attach to an Instance.
- Device string
- Multiattach bool
- Enable attachment of multiattach-capable volumes.
- Region 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 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.
- Vendor
Options Pulumi.Open Stack. Compute. Inputs. Volume Attach Vendor Options - Map of additional vendor-specific options. Supported options are described below.
- Instance
Id string - The ID of the Instance to attach the Volume to.
- Volume
Id string - The ID of the Volume to attach to an Instance.
- Device string
- Multiattach bool
- Enable attachment of multiattach-capable volumes.
- Region 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 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.
- Vendor
Options VolumeAttach Vendor Options Args - Map of additional vendor-specific options. Supported options are described below.
- instance
Id String - The ID of the Instance to attach the Volume to.
- volume
Id String - The ID of the Volume to attach to an Instance.
- device String
- multiattach Boolean
- Enable attachment of multiattach-capable volumes.
- region 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 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.
- vendor
Options VolumeAttach Vendor Options - Map of additional vendor-specific options. Supported options are described below.
- instance
Id string - The ID of the Instance to attach the Volume to.
- volume
Id string - The ID of the Volume to attach to an Instance.
- device string
- multiattach boolean
- Enable attachment of multiattach-capable volumes.
- region 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 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.
- vendor
Options VolumeAttach Vendor Options - Map of additional vendor-specific options. Supported options are described below.
- instance_
id str - The ID of the Instance to attach the Volume to.
- volume_
id str - The ID of the Volume to attach to an Instance.
- device str
- multiattach bool
- Enable attachment of multiattach-capable volumes.
- region 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 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 VolumeAttach Vendor Options Args - Map of additional vendor-specific options. Supported options are described below.
- instance
Id String - The ID of the Instance to attach the Volume to.
- volume
Id String - The ID of the Volume to attach to an Instance.
- device String
- multiattach Boolean
- Enable attachment of multiattach-capable volumes.
- region 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 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.
- vendor
Options 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)
Resource lookup is not supported in YAML
- 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.
- 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.
- Device string
- Instance
Id string - The ID of the Instance to attach the Volume to.
- Multiattach bool
- Enable attachment of multiattach-capable volumes.
- Region 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 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.
- Vendor
Options Pulumi.Open Stack. Compute. Inputs. Volume Attach Vendor Options - Map of additional vendor-specific options. Supported options are described below.
- Volume
Id string - The ID of the Volume to attach to an Instance.
- Device string
- Instance
Id string - The ID of the Instance to attach the Volume to.
- Multiattach bool
- Enable attachment of multiattach-capable volumes.
- Region 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 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.
- Vendor
Options VolumeAttach Vendor Options Args - Map of additional vendor-specific options. Supported options are described below.
- Volume
Id string - The ID of the Volume to attach to an Instance.
- device String
- instance
Id String - The ID of the Instance to attach the Volume to.
- multiattach Boolean
- Enable attachment of multiattach-capable volumes.
- region 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 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.
- vendor
Options VolumeAttach Vendor Options - Map of additional vendor-specific options. Supported options are described below.
- volume
Id String - The ID of the Volume to attach to an Instance.
- device string
- instance
Id string - The ID of the Instance to attach the Volume to.
- multiattach boolean
- Enable attachment of multiattach-capable volumes.
- region 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 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.
- vendor
Options VolumeAttach Vendor Options - Map of additional vendor-specific options. Supported options are described below.
- volume
Id string - The ID of the Volume to attach to an Instance.
- device str
- instance_
id str - The ID of the Instance to attach the Volume to.
- multiattach bool
- Enable attachment of multiattach-capable volumes.
- region 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 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 VolumeAttach Vendor Options Args - Map of additional vendor-specific options. Supported options are described below.
- volume_
id str - The ID of the Volume to attach to an Instance.
- device String
- instance
Id String - The ID of the Instance to attach the Volume to.
- multiattach Boolean
- Enable attachment of multiattach-capable volumes.
- region 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 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.
- vendor
Options Property Map - Map of additional vendor-specific options. Supported options are described below.
- volume
Id String - The ID of the Volume to attach to an Instance.
Supporting Types
VolumeAttachVendorOptions, VolumeAttachVendorOptionsArgs
- Ignore
Volume boolConfirmation - 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 boolConfirmation - 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 BooleanConfirmation - 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 booleanConfirmation - 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_ boolconfirmation - 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 BooleanConfirmation - 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
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.