github.com/tomaszheflik/terraform@v0.7.3-0.20160827060421-32f990b41594/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 ``` 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 36 -> **Note:** When resizing a Droplet, only a bigger Droplet size can be chosen. 37 38 * `backups` - (Optional) Boolean controlling if backups are made. Defaults to 39 false. 40 * `ipv6` - (Optional) Boolean controlling if IPv6 is enabled. Defaults to false. 41 * `private_networking` - (Optional) Boolean controlling if private networks are 42 enabled. Defaults to false. 43 * `ssh_keys` - (Optional) A list of SSH IDs or fingerprints to enable in 44 the format `[12345, 123456]`. To retrieve this info, use a tool such 45 as `curl` with the [DigitalOcean API](https://developers.digitalocean.com/#keys), 46 to retrieve them. 47 * `tags` - (Optional) A list of the tags to label this droplet. A tag resource 48 must exist before it can be associated with a droplet. 49 * `user_data` (Optional) - A string of the desired User Data for the Droplet. 50 User Data is currently only available in regions with metadata 51 listed in their features. 52 * `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. 53 54 ## Attributes Reference 55 56 The following attributes are exported: 57 58 * `id` - The ID of the Droplet 59 * `name`- The name of the Droplet 60 * `region` - The region of the Droplet 61 * `image` - The image of the Droplet 62 * `ipv6` - Is IPv6 enabled 63 * `ipv6_address` - The IPv6 address 64 * `ipv6_address_private` - The private networking IPv6 address 65 * `ipv4_address` - The IPv4 address 66 * `ipv4_address_private` - The private networking IPv4 address 67 * `locked` - Is the Droplet locked 68 * `private_networking` - Is private networking enabled 69 * `size` - The instance size 70 * `status` - The status of the droplet 71 * `tags` - The tags associated with the droplet 72 * `volume_ids` - A list of the attached block storage volumes 73 74 ## Import 75 76 Droplets can be imported using the droplet `id`, e.g. 77 78 ``` 79 terraform import digitalocean_droplet.mydroplet 100823 80 ```