github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/do/d/image.html.md (about) 1 --- 2 layout: "digitalocean" 3 page_title: "DigitalOcean: digitalocean_image" 4 sidebar_current: "docs-do-datasource-image" 5 description: |- 6 Get information on an snapshot. 7 --- 8 9 # digitalocean_image 10 11 Get information on an snapshot images. The aim of this datasource is to enable 12 you to build droplets based on snapshot names. 13 14 An error is triggered if zero or more than one result is returned by the query. 15 16 ## Example Usage 17 18 Get the data about a snapshot: 19 20 ```hcl 21 data "digitalocean_image" "example1" { 22 name = "example-1.0.0" 23 } 24 ``` 25 26 Reuse the data about a snapshot to create a droplet: 27 28 ```hcl 29 data "digitalocean_image" "example1" { 30 name = "example-1.0.0" 31 } 32 resource "digitalocean_droplet" "example1" { 33 image = "${data.digitalocean_image.example1.image}" 34 name = "example-1" 35 region = "nyc2" 36 size = "512mb" 37 } 38 ``` 39 40 ## Argument Reference 41 42 The following arguments are supported: 43 44 * `name` - The name of the image. 45 46 ## Attributes Reference 47 48 The following attributes are exported: 49 50 * `name` - See Argument Reference above. 51 * `image` - The id of the image. 52 * `min_disk_size`: The minimum 'disk' required for the image. 53 * `private` - Is image a public image or not. Public images represents 54 Linux distributions or Application, while non-public images represent 55 snapshots and backups and are only available within your account. 56 * `regions`: The regions that the image is available in. 57 * `size_gigabytes`: The size of the image in gigabytes. 58 * `type`: Type of the image. Can be "snapshot" or "backup".