1. Packages
  2. Digitalocean Provider
  3. API Docs
  4. Volume
DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi

digitalocean.Volume

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.35.0 published on Tuesday, Nov 19, 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 foobar = new digitalocean.Volume("foobar", {
        region: digitalocean.Region.NYC1,
        name: "baz",
        size: 100,
        initialFilesystemType: digitalocean.FileSystemType.EXT4,
        description: "an example volume",
    });
    const foobarDroplet = new digitalocean.Droplet("foobar", {
        name: "baz",
        size: digitalocean.DropletSlug.DropletS1VCPU1GB,
        image: "ubuntu-18-04-x64",
        region: digitalocean.Region.NYC1,
    });
    const foobarVolumeAttachment = new digitalocean.VolumeAttachment("foobar", {
        dropletId: foobarDroplet.id,
        volumeId: foobar.id,
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    foobar = digitalocean.Volume("foobar",
        region=digitalocean.Region.NYC1,
        name="baz",
        size=100,
        initial_filesystem_type=digitalocean.FileSystemType.EXT4,
        description="an example volume")
    foobar_droplet = digitalocean.Droplet("foobar",
        name="baz",
        size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
        image="ubuntu-18-04-x64",
        region=digitalocean.Region.NYC1)
    foobar_volume_attachment = digitalocean.VolumeAttachment("foobar",
        droplet_id=foobar_droplet.id,
        volume_id=foobar.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 {
    		foobar, err := digitalocean.NewVolume(ctx, "foobar", &digitalocean.VolumeArgs{
    			Region:                pulumi.String(digitalocean.RegionNYC1),
    			Name:                  pulumi.String("baz"),
    			Size:                  pulumi.Int(100),
    			InitialFilesystemType: pulumi.String(digitalocean.FileSystemTypeEXT4),
    			Description:           pulumi.String("an example volume"),
    		})
    		if err != nil {
    			return err
    		}
    		foobarDroplet, err := digitalocean.NewDroplet(ctx, "foobar", &digitalocean.DropletArgs{
    			Name:   pulumi.String("baz"),
    			Size:   pulumi.String(digitalocean.DropletSlugDropletS1VCPU1GB),
    			Image:  pulumi.String("ubuntu-18-04-x64"),
    			Region: pulumi.String(digitalocean.RegionNYC1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewVolumeAttachment(ctx, "foobar", &digitalocean.VolumeAttachmentArgs{
    			DropletId: foobarDroplet.ID(),
    			VolumeId:  foobar.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 foobar = new DigitalOcean.Volume("foobar", new()
        {
            Region = DigitalOcean.Region.NYC1,
            Name = "baz",
            Size = 100,
            InitialFilesystemType = DigitalOcean.FileSystemType.EXT4,
            Description = "an example volume",
        });
    
        var foobarDroplet = new DigitalOcean.Droplet("foobar", new()
        {
            Name = "baz",
            Size = DigitalOcean.DropletSlug.DropletS1VCPU1GB,
            Image = "ubuntu-18-04-x64",
            Region = DigitalOcean.Region.NYC1,
        });
    
        var foobarVolumeAttachment = new DigitalOcean.VolumeAttachment("foobar", new()
        {
            DropletId = foobarDroplet.Id,
            VolumeId = foobar.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 foobar = new Volume("foobar", VolumeArgs.builder()
                .region("nyc1")
                .name("baz")
                .size(100)
                .initialFilesystemType("ext4")
                .description("an example volume")
                .build());
    
            var foobarDroplet = new Droplet("foobarDroplet", DropletArgs.builder()
                .name("baz")
                .size("s-1vcpu-1gb")
                .image("ubuntu-18-04-x64")
                .region("nyc1")
                .build());
    
            var foobarVolumeAttachment = new VolumeAttachment("foobarVolumeAttachment", VolumeAttachmentArgs.builder()
                .dropletId(foobarDroplet.id())
                .volumeId(foobar.id())
                .build());
    
        }
    }
    
    resources:
      foobar:
        type: digitalocean:Volume
        properties:
          region: nyc1
          name: baz
          size: 100
          initialFilesystemType: ext4
          description: an example volume
      foobarDroplet:
        type: digitalocean:Droplet
        name: foobar
        properties:
          name: baz
          size: s-1vcpu-1gb
          image: ubuntu-18-04-x64
          region: nyc1
      foobarVolumeAttachment:
        type: digitalocean:VolumeAttachment
        name: foobar
        properties:
          dropletId: ${foobarDroplet.id}
          volumeId: ${foobar.id}
    

    You can also create a volume from an existing snapshot.

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const foobar = digitalocean.getVolumeSnapshot({
        name: "baz",
    });
    const foobarVolume = new digitalocean.Volume("foobar", {
        region: digitalocean.Region.LON1,
        name: "foo",
        size: foobar.then(foobar => foobar.minDiskSize),
        snapshotId: foobar.then(foobar => foobar.id),
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    foobar = digitalocean.get_volume_snapshot(name="baz")
    foobar_volume = digitalocean.Volume("foobar",
        region=digitalocean.Region.LON1,
        name="foo",
        size=foobar.min_disk_size,
        snapshot_id=foobar.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 {
    		foobar, err := digitalocean.LookupVolumeSnapshot(ctx, &digitalocean.LookupVolumeSnapshotArgs{
    			Name: pulumi.StringRef("baz"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewVolume(ctx, "foobar", &digitalocean.VolumeArgs{
    			Region:     pulumi.String(digitalocean.RegionLON1),
    			Name:       pulumi.String("foo"),
    			Size:       pulumi.Int(foobar.MinDiskSize),
    			SnapshotId: pulumi.String(foobar.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 foobar = DigitalOcean.GetVolumeSnapshot.Invoke(new()
        {
            Name = "baz",
        });
    
        var foobarVolume = new DigitalOcean.Volume("foobar", new()
        {
            Region = DigitalOcean.Region.LON1,
            Name = "foo",
            Size = foobar.Apply(getVolumeSnapshotResult => getVolumeSnapshotResult.MinDiskSize),
            SnapshotId = foobar.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 foobar = DigitaloceanFunctions.getVolumeSnapshot(GetVolumeSnapshotArgs.builder()
                .name("baz")
                .build());
    
            var foobarVolume = new Volume("foobarVolume", VolumeArgs.builder()
                .region("lon1")
                .name("foo")
                .size(foobar.applyValue(getVolumeSnapshotResult -> getVolumeSnapshotResult.minDiskSize()))
                .snapshotId(foobar.applyValue(getVolumeSnapshotResult -> getVolumeSnapshotResult.id()))
                .build());
    
        }
    }
    
    resources:
      foobarVolume:
        type: digitalocean:Volume
        name: foobar
        properties:
          region: lon1
          name: foo
          size: ${foobar.minDiskSize}
          snapshotId: ${foobar.id}
    variables:
      foobar:
        fn::invoke:
          Function: digitalocean:getVolumeSnapshot
          Arguments:
            name: baz
    

    Create Volume Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
    @overload
    def Volume(resource_name: str,
               args: VolumeArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Volume(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               region: Optional[Union[str, Region]] = None,
               size: Optional[int] = 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,
               snapshot_id: Optional[str] = None,
               tags: Optional[Sequence[str]] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var volumeResource = new DigitalOcean.Volume("volumeResource", new()
    {
        Region = "string",
        Size = 0,
        Description = "string",
        InitialFilesystemLabel = "string",
        InitialFilesystemType = "string",
        Name = "string",
        SnapshotId = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := digitalocean.NewVolume(ctx, "volumeResource", &digitalocean.VolumeArgs{
    	Region:                 pulumi.String("string"),
    	Size:                   pulumi.Int(0),
    	Description:            pulumi.String("string"),
    	InitialFilesystemLabel: pulumi.String("string"),
    	InitialFilesystemType:  pulumi.String("string"),
    	Name:                   pulumi.String("string"),
    	SnapshotId:             pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .region("string")
        .size(0)
        .description("string")
        .initialFilesystemLabel("string")
        .initialFilesystemType("string")
        .name("string")
        .snapshotId("string")
        .tags("string")
        .build());
    
    volume_resource = digitalocean.Volume("volumeResource",
        region="string",
        size=0,
        description="string",
        initial_filesystem_label="string",
        initial_filesystem_type="string",
        name="string",
        snapshot_id="string",
        tags=["string"])
    
    const volumeResource = new digitalocean.Volume("volumeResource", {
        region: "string",
        size: 0,
        description: "string",
        initialFilesystemLabel: "string",
        initialFilesystemType: "string",
        name: "string",
        snapshotId: "string",
        tags: ["string"],
    });
    
    type: digitalocean:Volume
    properties:
        description: string
        initialFilesystemLabel: string
        initialFilesystemType: string
        name: string
        region: string
        size: 0
        snapshotId: string
        tags:
            - string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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 limited 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
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.35.0 published on Tuesday, Nov 19, 2024 by Pulumi