Class DataDiskAttachment
Manages attaching a Disk to a Virtual Machine.
NOTE: Data Disks can be attached either directly on the
azure.compute.VirtualMachineresource, or using theazure.compute.DataDiskAttachmentresource - but the two cannot be used together. If both are used against the same Virtual Machine, spurious changes will occur.
Please Note: only Managed Disks are supported via this separate resource, Unmanaged Disks can be attached using the
storage_data_diskblock in theazure.compute.VirtualMachineresource.
Inherited Members
Namespace: Pulumi.Azure.Compute
Assembly: Pulumi.Azure.dll
Syntax
public class DataDiskAttachment : CustomResource
Constructors
View SourceDataDiskAttachment(String, DataDiskAttachmentArgs, CustomResourceOptions)
Create a DataDiskAttachment resource with the given unique name, arguments, and options.
Declaration
public DataDiskAttachment(string name, DataDiskAttachmentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DataDiskAttachmentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCaching
Specifies the caching requirements for this Data Disk. Possible values include None, ReadOnly and ReadWrite.
Declaration
public Output<string> Caching { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreateOption
The Create Option of the Data Disk, such as Empty or Attach. Defaults to Attach. Changing this forces a new resource to be created.
Declaration
public Output<string> CreateOption { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Lun
The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created.
Declaration
public Output<int> Lun { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
ManagedDiskId
The ID of an existing Managed Disk which should be attached. Changing this forces a new resource to be created.
Declaration
public Output<string> ManagedDiskId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VirtualMachineId
The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created.
Declaration
public Output<string> VirtualMachineId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
WriteAcceleratorEnabled
Specifies if Write Accelerator is enabled on the disk. This can only be enabled on Premium_LRS managed disks with no caching and M-Series VMs. Defaults to false.
Declaration
public Output<bool?> WriteAcceleratorEnabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, DataDiskAttachmentState, CustomResourceOptions)
Get an existing DataDiskAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DataDiskAttachment Get(string name, Input<string> id, DataDiskAttachmentState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DataDiskAttachmentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DataDiskAttachment |