Show / Hide Table of Contents

Class DataDiskAttachment

Manages attaching a Disk to a Virtual Machine.

NOTE: Data Disks can be attached either directly on the azure.compute.VirtualMachine resource, or using the azure.compute.DataDiskAttachment resource - 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_disk block in the azure.compute.VirtualMachine resource.

Inheritance
System.Object
Resource
CustomResource
DataDiskAttachment
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Compute
Assembly: Pulumi.Azure.dll
Syntax
public class DataDiskAttachment : CustomResource

Constructors

View Source

DataDiskAttachment(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 Source

Caching

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.