Volume
Provides a DigitalOcean Block Storage volume which can be attached to a Droplet in order to provide expanded storage.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var foobarVolume = new DigitalOcean.Volume("foobarVolume", new DigitalOcean.VolumeArgs
{
Region = "nyc1",
Size = 100,
InitialFilesystemType = "ext4",
Description = "an example volume",
});
var foobarDroplet = new DigitalOcean.Droplet("foobarDroplet", new DigitalOcean.DropletArgs
{
Size = "s-1vcpu-1gb",
Image = "ubuntu-18-04-x64",
Region = "nyc1",
});
var foobarVolumeAttachment = new DigitalOcean.VolumeAttachment("foobarVolumeAttachment", new DigitalOcean.VolumeAttachmentArgs
{
DropletId = foobarDroplet.Id,
VolumeId = foobarVolume.Id,
});
}
}
Coming soon!
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)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,
});Create a Volume Resource
new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);def Volume(resource_name, opts=None, description=None, filesystem_type=None, initial_filesystem_label=None, initial_filesystem_type=None, name=None, region=None, size=None, snapshot_id=None, tags=None, __props__=None);func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Volume Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Volume resource accepts the following input properties:
- Region string
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 (
xfsorext4) for the block storage volume.- Initial
Filesystem stringLabel Initial filesystem label for the block storage volume.
- Initial
Filesystem stringType Initial filesystem type (
xfsorext4) 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.
- 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
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 (
xfsorext4) for the block storage volume.- Initial
Filesystem stringLabel Initial filesystem label for the block storage volume.
- Initial
Filesystem stringType Initial filesystem type (
xfsorext4) 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.
- 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 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 (
xfsorext4) for the block storage volume.- initial
Filesystem stringLabel Initial filesystem label for the block storage volume.
- initial
Filesystem FilesystemType Type Initial filesystem type (
xfsorext4) 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.
- 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
The region that the block storage volume will be created in.
- size float
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 (
xfsorext4) for the block storage volume.- initial_
filesystem_ strlabel Initial filesystem label for the block storage volume.
- initial_
filesystem_ strtype Initial filesystem type (
xfsorext4) 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.
- 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
- List[str]
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 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 List[Integer] 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.
Look up an 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): Volumestatic get(resource_name, id, opts=None, description=None, droplet_ids=None, filesystem_label=None, filesystem_type=None, initial_filesystem_label=None, initial_filesystem_type=None, name=None, region=None, size=None, snapshot_id=None, tags=None, volume_urn=None, __props__=None);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)- 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.
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.
- 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 (
xfsorext4) for the block storage volume.- Initial
Filesystem stringLabel Initial filesystem label for the block storage volume.
- Initial
Filesystem stringType Initial filesystem type (
xfsorext4) 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.
- Region string
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 (
xfsorext4) for the block storage volume.- Initial
Filesystem stringLabel Initial filesystem label for the block storage volume.
- Initial
Filesystem stringType Initial filesystem type (
xfsorext4) 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.
- Region string
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 number[] A list of associated droplet ids.
- filesystem
Label string Filesystem label for the block storage volume.
- filesystem
Type string Filesystem type (
xfsorext4) for the block storage volume.- initial
Filesystem stringLabel Initial filesystem label for the block storage volume.
- initial
Filesystem FilesystemType Type Initial filesystem type (
xfsorext4) 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.
- region 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 List[Integer] A list of associated droplet ids.
- filesystem_
label str Filesystem label for the block storage volume.
- filesystem_
type str Filesystem type (
xfsorext4) for the block storage volume.- initial_
filesystem_ strlabel Initial filesystem label for the block storage volume.
- initial_
filesystem_ strtype Initial filesystem type (
xfsorext4) 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.
- region str
The region that the block storage volume will be created in.
- size float
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
- List[str]
A list of the tags to be applied to this Volume.
- volume_
urn str The uniform resource name for the volume.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.