Droplet
Provides a DigitalOcean Droplet resource. This can be used to create, modify, and delete Droplets.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Droplet;
import com.pulumi.digitalocean.DropletArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var web = new Droplet("web", DropletArgs.builder()
.image("ubuntu-18-04-x64")
.region("nyc2")
.size("s-1vcpu-1gb")
.build());
}
}
Import
Droplets can be imported using the Droplet id
, e.g.
$ pulumi import digitalocean:index/droplet:Droplet mydroplet 100823
Properties
A boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to false
. To make installation errors fatal, explicitly set it to true
.
Boolean controlling whether monitoring agent is installed. Defaults to false. If set to true
, you can configure monitor alert policies monitor alert resource
The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.
A list of SSH key IDs or fingerprints to enable in the format [12345, 123456]
. To retrieve this info, use the DigitalOcean API or CLI (doctl compute ssh-key list
). Once a Droplet is created keys can not be added or removed via this provider. Modifying this field will prompt you to destroy and recreate the Droplet.