VolumeArgs

data class VolumeArgs(val description: Output<String>? = null, val filesystemType: Output<String>? = null, val initialFilesystemLabel: Output<String>? = null, val initialFilesystemType: Output<Either<String, FileSystemType>>? = null, val name: Output<String>? = null, val region: Output<Either<String, Region>>? = null, val size: Output<Int>? = null, val snapshotId: Output<String>? = null, val tags: Output<List<String>>? = null) : ConvertibleToJava<VolumeArgs>

Provides a DigitalOcean Block Storage volume which can be attached to a Droplet in order to provide expanded storage.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.Volume;
import com.pulumi.digitalocean.VolumeArgs;
import com.pulumi.digitalocean.Droplet;
import com.pulumi.digitalocean.DropletArgs;
import com.pulumi.digitalocean.VolumeAttachment;
import com.pulumi.digitalocean.VolumeAttachmentArgs;
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 foobarVolume = new Volume("foobarVolume", VolumeArgs.builder()
.region("nyc1")
.size(100)
.initialFilesystemType("ext4")
.description("an example volume")
.build());
var foobarDroplet = new Droplet("foobarDroplet", DropletArgs.builder()
.size("s-1vcpu-1gb")
.image("ubuntu-18-04-x64")
.region("nyc1")
.build());
var foobarVolumeAttachment = new VolumeAttachment("foobarVolumeAttachment", VolumeAttachmentArgs.builder()
.dropletId(foobarDroplet.id())
.volumeId(foobarVolume.id())
.build());
}
}

Import

Volumes can be imported using the volume id, e.g.

$ pulumi import digitalocean:index/volume:Volume volume 506f78a4-e098-11e5-ad9f-000f53306ae1

Constructors

Link copied to clipboard
fun VolumeArgs(description: Output<String>? = null, filesystemType: Output<String>? = null, initialFilesystemLabel: Output<String>? = null, initialFilesystemType: Output<Either<String, FileSystemType>>? = null, name: Output<String>? = null, region: Output<Either<String, Region>>? = null, size: Output<Int>? = null, snapshotId: Output<String>? = null, tags: Output<List<String>>? = null)

Functions

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

Properties

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

A free-form text field up to a limit of 1024 bytes to describe a block storage volume.

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

Filesystem type (xfs or ext4) for the block storage volume.

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

Initial filesystem label for the block storage volume.

Link copied to clipboard
val initialFilesystemType: Output<Either<String, FileSystemType>>? = null

Initial filesystem type (xfs or ext4) for the block storage volume.

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

A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter.

Link copied to clipboard
val region: Output<Either<String, Region>>? = null

The region that the block storage volume will be created in.

Link copied to clipboard
val size: Output<Int>? = null

The size of the block storage volume in GiB. If updated, can only be expanded.

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

The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot

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

A list of the tags to be applied to this Volume.