digitalocean_droplet_snapshot

Droplet snapshots are saved instances of a Droplet. Use this data source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other resources.

Example Usage

Get the Droplet snapshot:

data "digitalocean_droplet_snapshot" "web-snapshot" {
  name_regex  = "^web"
  region      = "nyc3"
  most_recent = true
}

Create image from snapshot:

data "digitalocean_droplet_snapshot" "web-snapshot" {
  name_regex  = "^web"
  region      = "nyc3"
  most_recent = true
}

resource "digitalocean_droplet" "from-snapshot" {
  image  = data.digitalocean_droplet_snapshot.web-snapshot.id
  name   = "web-02"
  region = "nyc3"
  size   = "s-2vcpu-4gb"
}

Argument Reference

Attributes Reference

The following attributes are exported: