DropletSnapshotArgs

data class DropletSnapshotArgs(val dropletId: Output<String>? = null, val name: Output<String>? = null) : ConvertibleToJava<DropletSnapshotArgs>

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

Constructors

Link copied to clipboard
fun DropletSnapshotArgs(dropletId: Output<String>? = null, name: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): DropletSnapshotArgs

Properties

Link copied to clipboard
val dropletId: Output<String>? = null

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

Link copied to clipboard
val name: Output<String>? = null

A name for the Droplet snapshot.