digitalocean_droplet

Provides a DigitalOcean Droplet resource. This can be used to create, modify, and delete Droplets. Droplets also support provisioning.

Example Usage

# Create a new Web Droplet in the nyc2 region
resource "digitalocean_droplet" "web" {
  image  = "ubuntu-20-04-x64"
  name   = "web-1"
  region = "nyc2"
  size   = "s-1vcpu-1gb"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Droplets can be imported using the Droplet id, e.g.

terraform import digitalocean_droplet.mydroplet 100823