github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/do/r/volume.markdown (about)

     1  ---
     2  layout: "digitalocean"
     3  page_title: "DigitalOcean: digitalocean_volume"
     4  sidebar_current: "docs-do-resource-volume"
     5  description: |-
     6    Provides a DigitalOcean volume resource.
     7  ---
     8  
     9  # digitalocean\_volume
    10  
    11  Provides a DigitalOcean Block Storage volume which can be attached to a Droplet in order to provide expanded storage.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "digitalocean_volume" "foobar" {
    17    region      = "nyc1"
    18    name        = "baz"
    19    size        = 100
    20    description = "an example volume"
    21  }
    22  
    23  resource "digitalocean_droplet" "foobar" {
    24    name       = "baz"
    25    size       = "1gb"
    26    image      = "coreos-stable"
    27    region     = "nyc1"
    28    volume_ids = ["${digitalocean_volume.foobar.id}"]
    29  }
    30  ```
    31  
    32  ## Argument Reference
    33  
    34  The following arguments are supported:
    35  
    36  * `region` - (Required) The region that the block storage volume will be created in.
    37  * `name` - (Required) A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters.
    38  * `size` - (Required) The size of the block storage volume in GiB.
    39  * `description` - (Optional) A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    40  
    41  ## Attributes Reference
    42  
    43  The following attributes are exported:
    44  
    45  * `id` - The unique identifier for the block storage volume.
    46  
    47  
    48  ## Import
    49  
    50  Volumes can be imported using the `volume id`, e.g.
    51  
    52  ```
    53  terraform import digitalocean_volume.volumea 506f78a4-e098-11e5-ad9f-000f53306ae1
    54  ```