1. Packages
  2. DigitalOcean
  3. API Docs
  4. Volume
DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi

digitalocean.Volume

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const foobarVolume = new digitalocean.Volume("foobarVolume", {
        region: "nyc1",
        size: 100,
        initialFilesystemType: "ext4",
        description: "an example volume",
    });
    const foobarDroplet = new digitalocean.Droplet("foobarDroplet", {
        size: "s-1vcpu-1gb",
        image: "ubuntu-18-04-x64",
        region: "nyc1",
    });
    const foobarVolumeAttachment = new digitalocean.VolumeAttachment("foobarVolumeAttachment", {
        dropletId: foobarDroplet.id,
        volumeId: foobarVolume.id,
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    foobar_volume = digitalocean.Volume("foobarVolume",
        region="nyc1",
        size=100,
        initial_filesystem_type="ext4",
        description="an example volume")
    foobar_droplet = digitalocean.Droplet("foobarDroplet",
        size="s-1vcpu-1gb",
        image="ubuntu-18-04-x64",
        region="nyc1")
    foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
        droplet_id=foobar_droplet.id,
        volume_id=foobar_volume.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foobarVolume, err := digitalocean.NewVolume(ctx, "foobarVolume", &digitalocean.VolumeArgs{
    			Region:                pulumi.String("nyc1"),
    			Size:                  pulumi.Int(100),
    			InitialFilesystemType: pulumi.String("ext4"),
    			Description:           pulumi.String("an example volume"),
    		})
    		if err != nil {
    			return err
    		}
    		foobarDroplet, err := digitalocean.NewDroplet(ctx, "foobarDroplet", &digitalocean.DropletArgs{
    			Size:   pulumi.String("s-1vcpu-1gb"),
    			Image:  pulumi.String("ubuntu-18-04-x64"),
    			Region: pulumi.String("nyc1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewVolumeAttachment(ctx, "foobarVolumeAttachment", &digitalocean.VolumeAttachmentArgs{
    			DropletId: foobarDroplet.ID(),
    			VolumeId:  foobarVolume.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var foobarVolume = new DigitalOcean.Volume("foobarVolume", new()
        {
            Region = "nyc1",
            Size = 100,
            InitialFilesystemType = "ext4",
            Description = "an example volume",
        });
    
        var foobarDroplet = new DigitalOcean.Droplet("foobarDroplet", new()
        {
            Size = "s-1vcpu-1gb",
            Image = "ubuntu-18-04-x64",
            Region = "nyc1",
        });
    
        var foobarVolumeAttachment = new DigitalOcean.VolumeAttachment("foobarVolumeAttachment", new()
        {
            DropletId = foobarDroplet.Id,
            VolumeId = foobarVolume.Id,
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      foobarVolume:
        type: digitalocean:Volume
        properties:
          region: nyc1
          size: 100
          initialFilesystemType: ext4
          description: an example volume
      foobarDroplet:
        type: digitalocean:Droplet
        properties:
          size: s-1vcpu-1gb
          image: ubuntu-18-04-x64
          region: nyc1
      foobarVolumeAttachment:
        type: digitalocean:VolumeAttachment
        properties:
          dropletId: ${foobarDroplet.id}
          volumeId: ${foobarVolume.id}
    

    You can also create a volume from an existing snapshot.

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const foobarVolumeSnapshot = digitalocean.getVolumeSnapshot({
        name: "baz",
    });
    const foobarVolume = new digitalocean.Volume("foobarVolume", {
        region: "lon1",
        size: foobarVolumeSnapshot.then(foobarVolumeSnapshot => foobarVolumeSnapshot.minDiskSize),
        snapshotId: foobarVolumeSnapshot.then(foobarVolumeSnapshot => foobarVolumeSnapshot.id),
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    foobar_volume_snapshot = digitalocean.get_volume_snapshot(name="baz")
    foobar_volume = digitalocean.Volume("foobarVolume",
        region="lon1",
        size=foobar_volume_snapshot.min_disk_size,
        snapshot_id=foobar_volume_snapshot.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		foobarVolumeSnapshot, err := digitalocean.LookupVolumeSnapshot(ctx, &digitalocean.LookupVolumeSnapshotArgs{
    			Name: pulumi.StringRef("baz"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewVolume(ctx, "foobarVolume", &digitalocean.VolumeArgs{
    			Region:     pulumi.String("lon1"),
    			Size:       *pulumi.Int(foobarVolumeSnapshot.MinDiskSize),
    			SnapshotId: *pulumi.String(foobarVolumeSnapshot.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var foobarVolumeSnapshot = DigitalOcean.GetVolumeSnapshot.Invoke(new()
        {
            Name = "baz",
        });
    
        var foobarVolume = new DigitalOcean.Volume("foobarVolume", new()
        {
            Region = "lon1",
            Size = foobarVolumeSnapshot.Apply(getVolumeSnapshotResult => getVolumeSnapshotResult.MinDiskSize),
            SnapshotId = foobarVolumeSnapshot.Apply(getVolumeSnapshotResult => getVolumeSnapshotResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetVolumeSnapshotArgs;
    import com.pulumi.digitalocean.Volume;
    import com.pulumi.digitalocean.VolumeArgs;
    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) {
            final var foobarVolumeSnapshot = DigitaloceanFunctions.getVolumeSnapshot(GetVolumeSnapshotArgs.builder()
                .name("baz")
                .build());
    
            var foobarVolume = new Volume("foobarVolume", VolumeArgs.builder()        
                .region("lon1")
                .size(foobarVolumeSnapshot.applyValue(getVolumeSnapshotResult -> getVolumeSnapshotResult.minDiskSize()))
                .snapshotId(foobarVolumeSnapshot.applyValue(getVolumeSnapshotResult -> getVolumeSnapshotResult.id()))
                .build());
    
        }
    }
    
    resources:
      foobarVolume:
        type: digitalocean:Volume
        properties:
          region: lon1
          size: ${foobarVolumeSnapshot.minDiskSize}
          snapshotId: ${foobarVolumeSnapshot.id}
    variables:
      foobarVolumeSnapshot:
        fn::invoke:
          Function: digitalocean:getVolumeSnapshot
          Arguments:
            name: baz
    

    Create Volume Resource

    new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
    @overload
    def Volume(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               filesystem_type: Optional[str] = None,
               initial_filesystem_label: Optional[str] = None,
               initial_filesystem_type: Optional[Union[str, FileSystemType]] = None,
               name: Optional[str] = None,
               region: Optional[Union[str, Region]] = None,
               size: Optional[int] = None,
               snapshot_id: Optional[str] = None,
               tags: Optional[Sequence[str]] = None)
    @overload
    def Volume(resource_name: str,
               args: VolumeArgs,
               opts: Optional[ResourceOptions] = None)
    func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
    public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
    public Volume(String name, VolumeArgs args)
    public Volume(String name, VolumeArgs args, CustomResourceOptions options)
    
    type: digitalocean:Volume
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Volume Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Volume resource accepts the following input properties:

    Region string | Pulumi.DigitalOcean.Region
    The region that the block storage volume will be created in.
    Size int
    The size of the block storage volume in GiB. If updated, can only be expanded.
    Description string
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    FilesystemType string
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    InitialFilesystemLabel string
    Initial filesystem label for the block storage volume.
    InitialFilesystemType string | Pulumi.DigitalOcean.FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    Name string
    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.
    SnapshotId string
    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
    Tags List<string>
    A list of the tags to be applied to this Volume.
    Region string | Region
    The region that the block storage volume will be created in.
    Size int
    The size of the block storage volume in GiB. If updated, can only be expanded.
    Description string
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    FilesystemType string
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    InitialFilesystemLabel string
    Initial filesystem label for the block storage volume.
    InitialFilesystemType string | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    Name string
    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.
    SnapshotId string
    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
    Tags []string
    A list of the tags to be applied to this Volume.
    region String | Region
    The region that the block storage volume will be created in.
    size Integer
    The size of the block storage volume in GiB. If updated, can only be expanded.
    description String
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    filesystemType String
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initialFilesystemLabel String
    Initial filesystem label for the block storage volume.
    initialFilesystemType String | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name String
    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.
    snapshotId String
    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
    tags List<String>
    A list of the tags to be applied to this Volume.
    region string | Region
    The region that the block storage volume will be created in.
    size number
    The size of the block storage volume in GiB. If updated, can only be expanded.
    description string
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    filesystemType string
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initialFilesystemLabel string
    Initial filesystem label for the block storage volume.
    initialFilesystemType string | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name string
    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.
    snapshotId string
    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
    tags string[]
    A list of the tags to be applied to this Volume.
    region str | Region
    The region that the block storage volume will be created in.
    size int
    The size of the block storage volume in GiB. If updated, can only be expanded.
    description str
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    filesystem_type str
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initial_filesystem_label str
    Initial filesystem label for the block storage volume.
    initial_filesystem_type str | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name str
    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.
    snapshot_id str
    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
    tags Sequence[str]
    A list of the tags to be applied to this Volume.
    region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
    The region that the block storage volume will be created in.
    size Number
    The size of the block storage volume in GiB. If updated, can only be expanded.
    description String
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    filesystemType String
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initialFilesystemLabel String
    Initial filesystem label for the block storage volume.
    initialFilesystemType String | "ext4" | "xfs"
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name String
    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.
    snapshotId String
    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
    tags List<String>
    A list of the tags to be applied to this Volume.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:

    DropletIds List<int>
    A list of associated droplet ids.
    FilesystemLabel string
    Filesystem label for the block storage volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    VolumeUrn string
    The uniform resource name for the volume.
    DropletIds []int
    A list of associated droplet ids.
    FilesystemLabel string
    Filesystem label for the block storage volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    VolumeUrn string
    The uniform resource name for the volume.
    dropletIds List<Integer>
    A list of associated droplet ids.
    filesystemLabel String
    Filesystem label for the block storage volume.
    id String
    The provider-assigned unique ID for this managed resource.
    volumeUrn String
    The uniform resource name for the volume.
    dropletIds number[]
    A list of associated droplet ids.
    filesystemLabel string
    Filesystem label for the block storage volume.
    id string
    The provider-assigned unique ID for this managed resource.
    volumeUrn string
    The uniform resource name for the volume.
    droplet_ids Sequence[int]
    A list of associated droplet ids.
    filesystem_label str
    Filesystem label for the block storage volume.
    id str
    The provider-assigned unique ID for this managed resource.
    volume_urn str
    The uniform resource name for the volume.
    dropletIds List<Number>
    A list of associated droplet ids.
    filesystemLabel String
    Filesystem label for the block storage volume.
    id String
    The provider-assigned unique ID for this managed resource.
    volumeUrn String
    The uniform resource name for the volume.

    Look up Existing Volume Resource

    Get an existing Volume resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VolumeState, opts?: CustomResourceOptions): Volume
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            droplet_ids: Optional[Sequence[int]] = None,
            filesystem_label: Optional[str] = None,
            filesystem_type: Optional[str] = None,
            initial_filesystem_label: Optional[str] = None,
            initial_filesystem_type: Optional[Union[str, FileSystemType]] = None,
            name: Optional[str] = None,
            region: Optional[Union[str, Region]] = None,
            size: Optional[int] = None,
            snapshot_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            volume_urn: Optional[str] = None) -> Volume
    func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
    public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
    public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    DropletIds List<int>
    A list of associated droplet ids.
    FilesystemLabel string
    Filesystem label for the block storage volume.
    FilesystemType string
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    InitialFilesystemLabel string
    Initial filesystem label for the block storage volume.
    InitialFilesystemType string | Pulumi.DigitalOcean.FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    Name string
    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.
    Region string | Pulumi.DigitalOcean.Region
    The region that the block storage volume will be created in.
    Size int
    The size of the block storage volume in GiB. If updated, can only be expanded.
    SnapshotId string
    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
    Tags List<string>
    A list of the tags to be applied to this Volume.
    VolumeUrn string
    The uniform resource name for the volume.
    Description string
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    DropletIds []int
    A list of associated droplet ids.
    FilesystemLabel string
    Filesystem label for the block storage volume.
    FilesystemType string
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    InitialFilesystemLabel string
    Initial filesystem label for the block storage volume.
    InitialFilesystemType string | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    Name string
    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.
    Region string | Region
    The region that the block storage volume will be created in.
    Size int
    The size of the block storage volume in GiB. If updated, can only be expanded.
    SnapshotId string
    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
    Tags []string
    A list of the tags to be applied to this Volume.
    VolumeUrn string
    The uniform resource name for the volume.
    description String
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    dropletIds List<Integer>
    A list of associated droplet ids.
    filesystemLabel String
    Filesystem label for the block storage volume.
    filesystemType String
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initialFilesystemLabel String
    Initial filesystem label for the block storage volume.
    initialFilesystemType String | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name String
    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.
    region String | Region
    The region that the block storage volume will be created in.
    size Integer
    The size of the block storage volume in GiB. If updated, can only be expanded.
    snapshotId String
    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
    tags List<String>
    A list of the tags to be applied to this Volume.
    volumeUrn String
    The uniform resource name for the volume.
    description string
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    dropletIds number[]
    A list of associated droplet ids.
    filesystemLabel string
    Filesystem label for the block storage volume.
    filesystemType string
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initialFilesystemLabel string
    Initial filesystem label for the block storage volume.
    initialFilesystemType string | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name string
    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.
    region string | Region
    The region that the block storage volume will be created in.
    size number
    The size of the block storage volume in GiB. If updated, can only be expanded.
    snapshotId string
    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
    tags string[]
    A list of the tags to be applied to this Volume.
    volumeUrn string
    The uniform resource name for the volume.
    description str
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    droplet_ids Sequence[int]
    A list of associated droplet ids.
    filesystem_label str
    Filesystem label for the block storage volume.
    filesystem_type str
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initial_filesystem_label str
    Initial filesystem label for the block storage volume.
    initial_filesystem_type str | FileSystemType
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name str
    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.
    region str | Region
    The region that the block storage volume will be created in.
    size int
    The size of the block storage volume in GiB. If updated, can only be expanded.
    snapshot_id str
    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
    tags Sequence[str]
    A list of the tags to be applied to this Volume.
    volume_urn str
    The uniform resource name for the volume.
    description String
    A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
    dropletIds List<Number>
    A list of associated droplet ids.
    filesystemLabel String
    Filesystem label for the block storage volume.
    filesystemType String
    Filesystem type (xfs or ext4) for the block storage volume.

    Deprecated:This fields functionality has been replaced by initial_filesystem_type. The property will still remain as a computed attribute representing the current volumes filesystem type.

    initialFilesystemLabel String
    Initial filesystem label for the block storage volume.
    initialFilesystemType String | "ext4" | "xfs"
    Initial filesystem type (xfs or ext4) for the block storage volume.
    name String
    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.
    region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
    The region that the block storage volume will be created in.
    size Number
    The size of the block storage volume in GiB. If updated, can only be expanded.
    snapshotId String
    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
    tags List<String>
    A list of the tags to be applied to this Volume.
    volumeUrn String
    The uniform resource name for the volume.

    Supporting Types

    FileSystemType, FileSystemTypeArgs

    EXT4
    ext4
    XFS
    xfs
    FileSystemTypeEXT4
    ext4
    FileSystemTypeXFS
    xfs
    EXT4
    ext4
    XFS
    xfs
    EXT4
    ext4
    XFS
    xfs
    EXT4
    ext4
    XFS
    xfs
    "ext4"
    ext4
    "xfs"
    xfs

    Region, RegionArgs

    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    RegionNYC1
    nyc1
    RegionNYC2
    nyc2
    RegionNYC3
    nyc3
    RegionSGP1
    sgp1
    RegionLON1
    lon1
    RegionAMS2
    ams2
    RegionAMS3
    ams3
    RegionFRA1
    fra1
    RegionTOR1
    tor1
    RegionSFO1
    sfo1
    RegionSFO2
    sfo2
    RegionSFO3
    sfo3
    RegionBLR1
    blr1
    RegionSYD1
    syd1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    "nyc1"
    nyc1
    "nyc2"
    nyc2
    "nyc3"
    nyc3
    "sgp1"
    sgp1
    "lon1"
    lon1
    "ams2"
    ams2
    "ams3"
    ams3
    "fra1"
    fra1
    "tor1"
    tor1
    "sfo1"
    sfo1
    "sfo2"
    sfo2
    "sfo3"
    sfo3
    "blr1"
    blr1
    "syd1"
    syd1

    Import

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

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

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi