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

     1  ---
     2  layout: "digitalocean"
     3  page_title: "DigitalOcean: digitalocean_droplet"
     4  sidebar_current: "docs-do-resource-droplet"
     5  description: |-
     6    Provides a DigitalOcean Droplet resource. This can be used to create, modify, and delete Droplets. Droplets also support provisioning.
     7  ---
     8  
     9  # digitalocean\_droplet
    10  
    11  Provides a DigitalOcean Droplet resource. This can be used to create,
    12  modify, and delete Droplets. Droplets also support
    13  [provisioning](/docs/provisioners/index.html).
    14  
    15  ## Example Usage
    16  
    17  ```hcl
    18  # Create a new Web Droplet in the nyc2 region
    19  resource "digitalocean_droplet" "web" {
    20    image  = "ubuntu-14-04-x64"
    21    name   = "web-1"
    22    region = "nyc2"
    23    size   = "512mb"
    24  }
    25  ```
    26  
    27  ## Argument Reference
    28  
    29  The following arguments are supported:
    30  
    31  * `image` - (Required) The Droplet image ID or slug.
    32  * `name` - (Required) The Droplet name
    33  * `region` - (Required) The region to start in
    34  * `size` - (Required) The instance size to start
    35  * `backups` - (Optional) Boolean controlling if backups are made. Defaults to
    36     false.
    37  * `ipv6` - (Optional) Boolean controlling if IPv6 is enabled. Defaults to false.
    38  * `private_networking` - (Optional) Boolean controlling if private networks are
    39     enabled. Defaults to false.
    40  * `ssh_keys` - (Optional) A list of SSH IDs or fingerprints to enable in
    41     the format `[12345, 123456]`. To retrieve this info, use a tool such
    42     as `curl` with the [DigitalOcean API](https://developers.digitalocean.com/#keys),
    43     to retrieve them.
    44  * `resize_disk` - (Optional) Boolean controlling whether to increase the disk
    45     size when resizing a Droplet. It defaults to `true`. When set to `false`,
    46     only the Droplet's RAM and CPU will be resized. **Increasing a Droplet's disk
    47     size is a permanent change**. Increasing only RAM and CPU is reversible.
    48  * `tags` - (Optional) A list of the tags to label this droplet. A tag resource
    49     must exist before it can be associated with a droplet.
    50  * `user_data` (Optional) - A string of the desired User Data for the Droplet.
    51  * `volume_ids` (Optional) - A list of the IDs of each [block storage volume](/docs/providers/do/r/volume.html) to be attached to the Droplet.
    52  
    53  ## Attributes Reference
    54  
    55  The following attributes are exported:
    56  
    57  * `id` - The ID of the Droplet
    58  * `name`- The name of the Droplet
    59  * `region` - The region of the Droplet
    60  * `image` - The image of the Droplet
    61  * `ipv6` - Is IPv6 enabled
    62  * `ipv6_address` - The IPv6 address
    63  * `ipv6_address_private` - The private networking IPv6 address
    64  * `ipv4_address` - The IPv4 address
    65  * `ipv4_address_private` - The private networking IPv4 address
    66  * `locked` - Is the Droplet locked
    67  * `private_networking` - Is private networking enabled
    68  * `price_hourly` - Droplet hourly price
    69  * `price_monthly` - Droplet monthly price
    70  * `size` - The instance size
    71  * `disk` - The size of the instance's disk in GB
    72  * `vcpus` - The number of the instance's virtual CPUs
    73  * `status` - The status of the droplet
    74  * `tags` - The tags associated with the droplet
    75  * `volume_ids` - A list of the attached block storage volumes
    76  
    77  ## Import
    78  
    79  Droplets can be imported using the droplet `id`, e.g.
    80  
    81  ```
    82  terraform import digitalocean_droplet.mydroplet 100823
    83  ```