DropletSnapshot

class DropletSnapshot : KotlinCustomResource

Provides a resource which can be used to create a snapshot from an existing DigitalOcean Droplet.

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 com.pulumi.digitalocean.DropletSnapshot;
import com.pulumi.digitalocean.DropletSnapshotArgs;
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()
.size("s-1vcpu-1gb")
.image("ubuntu-22-04-x64")
.region("nyc3")
.build());
var web_snapshot = new DropletSnapshot("web-snapshot", DropletSnapshotArgs.builder()
.dropletId(web.id())
.build());
var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
.image(web_snapshot.id())
.region("nyc3")
.size("s-2vcpu-4gb")
.build());
}
}

Import

Droplet Snapshots can be imported using the snapshot id, e.g.

$ pulumi import digitalocean:index/dropletSnapshot:DropletSnapshot mysnapshot 123456

Properties

Link copied to clipboard
val createdAt: Output<String>

The date and time the Droplet snapshot was created.

Link copied to clipboard
val dropletId: Output<String>

The ID of the Droplet from which the snapshot will be taken.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val minDiskSize: Output<Int>

The minimum size in gigabytes required for a Droplet to be created based on this snapshot.

Link copied to clipboard
val name: Output<String>

A name for the Droplet snapshot.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val regions: Output<List<String>>

A list of DigitalOcean region "slugs" indicating where the droplet snapshot is available.

Link copied to clipboard
val size: Output<Double>

The billable size of the Droplet snapshot in gigabytes.

Link copied to clipboard
val urn: Output<String>