github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/azure/r/data_disk.html.markdown (about)

     1  ---
     2  layout: "azure"
     3  page_title: "Azure: azure_data_disk"
     4  sidebar_current: "docs-azure-resource-data-disk"
     5  description: |-
     6    Adds a data disk to a virtual machine. If the name of an existing disk is given, it will attach that disk. Otherwise it will create and attach a new empty disk.
     7  ---
     8  
     9  # azure\_data\_disk
    10  
    11  Adds a data disk to a virtual machine. If the name of an existing disk is given,
    12  it will attach that disk. Otherwise it will create and attach a new empty disk.
    13  
    14  ## Example Usage
    15  
    16  ```
    17  resource "azure_data_disk" "data" {
    18      lun = 0
    19      size = 10
    20      storage_service_name = "yourstorage"
    21      virtual_machine = "server1"
    22  }
    23  ```
    24  
    25  ## Argument Reference
    26  
    27  The following arguments are supported:
    28  
    29  * `name` - (Optional) The name of an existing registered disk to attach to the
    30      virtual machine. If left empty, a new empty disk will be created and
    31      attached instead. Changing this forces a new resource to be created.
    32  
    33  * `label` - (Optional) The identifier of the data disk. Changing this forces a
    34      new resource to be created (defaults to "virtual_machine-lun")
    35  
    36  * `lun` - (Required) The Logical Unit Number (LUN) for the disk. The LUN
    37      specifies the slot in which the data drive appears when mounted for usage
    38      by the virtual machine. Valid LUN values are 0 through 31.
    39  
    40  * `size` - (Optional) The size, in GB, of an empty disk to be attached to the
    41      virtual machine. Required when creating a new disk, not used otherwise.
    42  
    43  * `caching` - (Optional) The caching behavior of data disk. Valid options are:
    44      `None`, `ReadOnly` and `ReadWrite` (defaults `None`)
    45  
    46  * `storage_service_name` - (Optional) The name of an existing storage account
    47      within the subscription which will be used to store the VHD of this disk.
    48      Required if no value is supplied for `media_link`. Changing this forces
    49      a new resource to be created.
    50  
    51  * `media_link` - (Optional) The location of the blob in storage where the VHD
    52      of this disk will be created. The storage account where must be associated
    53      with the subscription. Changing this forces a new resource to be created.
    54  
    55  * `source_media_link` - (Optional) The location of a blob in storage where a
    56      VHD file is located that is imported and registered as a disk. If a value
    57      is supplied, `media_link` will not be used.
    58  
    59  * `virtual_machine` - (Required) The name of the virtual machine the disk will
    60      be attached to.
    61  
    62  ## Attributes Reference
    63  
    64  The following attributes are exported:
    65  
    66  * `id` - The security group ID.
    67  * `name` - The name of the disk.
    68  * `label` - The identifier for the disk.
    69  * `media_link` - The location of the blob in storage where the VHD of this disk
    70      is created.