Class Volume
Provides a Linode Volume resource. This can be used to create, modify, and delete Linodes Block Storage Volumes. Block Storage Volumes are removable storage disks that persist outside the life-cycle of Linode Instances. These volumes can be attached to and detached from Linode instances throughout a region.
For more information, see How to Use Block Storage with Your Linode and the Linode APIv4 docs.
Example Usage
using Pulumi;
using Linode = Pulumi.Linode;
class MyStack : Stack
{
public MyStack()
{
var foobaz = new Linode.Instance("foobaz", new Linode.InstanceArgs
{
Region = "us-west",
RootPass = "3X4mp13",
Tags =
{
"foobaz",
},
Type = "g6-nanode-1",
});
var foobar = new Linode.Volume("foobar", new Linode.VolumeArgs
{
Label = "foo-volume",
LinodeId = foobaz.Id,
Region = foobaz.Region,
});
}
}
Attributes
This resource exports the following attributes:
status- The label of the Linode Volume.filesystem_path- The full filesystem path for the Volume based on the Volume's label. The path is "/dev/disk/by-id/scsi-0Linode_Volume_" + the Volume label
Inherited Members
Namespace: Pulumi.Linode
Assembly: Pulumi.Linode.dll
Syntax
public class Volume : CustomResource
Constructors
View SourceVolume(String, VolumeArgs, CustomResourceOptions)
Create a Volume resource with the given unique name, arguments, and options.
Declaration
public Volume(string name, VolumeArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VolumeArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceFilesystemPath
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0Linode_Volume_ + Volume label.
Declaration
public Output<string> FilesystemPath { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Label
The label of the Linode Volume
Declaration
public Output<string> Label { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LinodeId
The ID of a Linode Instance where the the Volume should be attached.
Declaration
public Output<int> LinodeId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Region
The region where this volume will be deployed. Examples are "us-east", "us-west", "ap-south", etc. Changing region forces the creation of a new Linode Volume..
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Size
Size of the Volume in GB.
Declaration
public Output<int> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Status
The status of the volume, indicating the current readiness state.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A list of tags applied to this object. Tags are for organizational purposes only.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, VolumeState, CustomResourceOptions)
Get an existing Volume resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Volume Get(string name, Input<string> id, VolumeState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| VolumeState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Volume |