digitalocean.Volume
Explore with Pulumi AI
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
The Volume resource accepts the following input properties:
- Region
string | Pulumi.
Digital Ocean. 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.
- Filesystem
Type string - Filesystem type (
xfs
orext4
) for the block storage volume. - Initial
Filesystem stringLabel - Initial filesystem label for the block storage volume.
- Initial
Filesystem string | Pulumi.Type Digital Ocean. File System Type - Initial filesystem type (
xfs
orext4
) 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.
- Snapshot
Id 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
- 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.
- Filesystem
Type string - Filesystem type (
xfs
orext4
) for the block storage volume. - Initial
Filesystem stringLabel - Initial filesystem label for the block storage volume.
- Initial
Filesystem string | FileType System Type - Initial filesystem type (
xfs
orext4
) 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.
- Snapshot
Id 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
- []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.
- filesystem
Type String - Filesystem type (
xfs
orext4
) for the block storage volume. - initial
Filesystem StringLabel - Initial filesystem label for the block storage volume.
- initial
Filesystem String | FileType System Type - Initial filesystem type (
xfs
orext4
) 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.
- snapshot
Id 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
- 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.
- filesystem
Type string - Filesystem type (
xfs
orext4
) for the block storage volume. - initial
Filesystem stringLabel - Initial filesystem label for the block storage volume.
- initial
Filesystem string | FileType System Type - Initial filesystem type (
xfs
orext4
) 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.
- snapshot
Id 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
- 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
orext4
) for the block storage volume. - initial_
filesystem_ strlabel - Initial filesystem label for the block storage volume.
- initial_
filesystem_ str | Filetype System Type - Initial filesystem type (
xfs
orext4
) 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
- 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.
- filesystem
Type String - Filesystem type (
xfs
orext4
) for the block storage volume. - initial
Filesystem StringLabel - Initial filesystem label for the block storage volume.
- initial
Filesystem String | "ext4" | "xfs"Type - Initial filesystem type (
xfs
orext4
) 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.
- snapshot
Id 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
- 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:
- Droplet
Ids List<int> - A list of associated droplet ids.
- Filesystem
Label string - Filesystem label for the block storage volume.
- Id string
- The provider-assigned unique ID for this managed resource.
- Volume
Urn string - The uniform resource name for the volume.
- Droplet
Ids []int - A list of associated droplet ids.
- Filesystem
Label string - Filesystem label for the block storage volume.
- Id string
- The provider-assigned unique ID for this managed resource.
- Volume
Urn string - The uniform resource name for the volume.
- droplet
Ids List<Integer> - A list of associated droplet ids.
- filesystem
Label String - Filesystem label for the block storage volume.
- id String
- The provider-assigned unique ID for this managed resource.
- volume
Urn String - The uniform resource name for the volume.
- droplet
Ids number[] - A list of associated droplet ids.
- filesystem
Label string - Filesystem label for the block storage volume.
- id string
- The provider-assigned unique ID for this managed resource.
- volume
Urn 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.
- droplet
Ids List<Number> - A list of associated droplet ids.
- filesystem
Label String - Filesystem label for the block storage volume.
- id String
- The provider-assigned unique ID for this managed resource.
- volume
Urn 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.
- Description string
- A free-form text field up to a limit of 1024 bytes to describe a block storage volume.
- Droplet
Ids List<int> - A list of associated droplet ids.
- Filesystem
Label string - Filesystem label for the block storage volume.
- Filesystem
Type string - Filesystem type (
xfs
orext4
) for the block storage volume. - Initial
Filesystem stringLabel - Initial filesystem label for the block storage volume.
- Initial
Filesystem string | Pulumi.Type Digital Ocean. File System Type - Initial filesystem type (
xfs
orext4
) 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.
Digital Ocean. 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 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
- List<string>
- A list of the tags to be applied to this Volume.
- Volume
Urn 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.
- Droplet
Ids []int - A list of associated droplet ids.
- Filesystem
Label string - Filesystem label for the block storage volume.
- Filesystem
Type string - Filesystem type (
xfs
orext4
) for the block storage volume. - Initial
Filesystem stringLabel - Initial filesystem label for the block storage volume.
- Initial
Filesystem string | FileType System Type - Initial filesystem type (
xfs
orext4
) 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.
- Snapshot
Id 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
- []string
- A list of the tags to be applied to this Volume.
- Volume
Urn 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.
- droplet
Ids List<Integer> - A list of associated droplet ids.
- filesystem
Label String - Filesystem label for the block storage volume.
- filesystem
Type String - Filesystem type (
xfs
orext4
) for the block storage volume. - initial
Filesystem StringLabel - Initial filesystem label for the block storage volume.
- initial
Filesystem String | FileType System Type - Initial filesystem type (
xfs
orext4
) 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.
- snapshot
Id 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
- List<String>
- A list of the tags to be applied to this Volume.
- volume
Urn 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.
- droplet
Ids number[] - A list of associated droplet ids.
- filesystem
Label string - Filesystem label for the block storage volume.
- filesystem
Type string - Filesystem type (
xfs
orext4
) for the block storage volume. - initial
Filesystem stringLabel - Initial filesystem label for the block storage volume.
- initial
Filesystem string | FileType System Type - Initial filesystem type (
xfs
orext4
) 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.
- snapshot
Id 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
- string[]
- A list of the tags to be applied to this Volume.
- volume
Urn 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
orext4
) for the block storage volume. - initial_
filesystem_ strlabel - Initial filesystem label for the block storage volume.
- initial_
filesystem_ str | Filetype System Type - Initial filesystem type (
xfs
orext4
) 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
- 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.
- droplet
Ids List<Number> - A list of associated droplet ids.
- filesystem
Label String - Filesystem label for the block storage volume.
- filesystem
Type String - Filesystem type (
xfs
orext4
) for the block storage volume. - initial
Filesystem StringLabel - Initial filesystem label for the block storage volume.
- initial
Filesystem String | "ext4" | "xfs"Type - Initial filesystem type (
xfs
orext4
) 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.
- snapshot
Id 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
- List<String>
- A list of the tags to be applied to this Volume.
- volume
Urn String - The uniform resource name for the volume.
Supporting Types
FileSystemType, FileSystemTypeArgs
- EXT4
- ext4
- XFS
- xfs
- File
System Type EXT4 - ext4
- File
System Type XFS - 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
- Region
NYC1 - nyc1
- Region
NYC2 - nyc2
- Region
NYC3 - nyc3
- Region
SGP1 - sgp1
- Region
LON1 - lon1
- Region
AMS2 - ams2
- Region
AMS3 - ams3
- Region
FRA1 - fra1
- Region
TOR1 - tor1
- Region
SFO1 - sfo1
- Region
SFO2 - sfo2
- Region
SFO3 - sfo3
- Region
BLR1 - blr1
- Region
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
- "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.