Show / Hide Table of Contents

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

Inheritance
System.Object
Resource
CustomResource
Volume
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Linode
Assembly: Pulumi.Linode.dll
Syntax
public class Volume : CustomResource

Constructors

View Source

Volume(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 Source

FilesystemPath

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>
View Source

Label

The label of the Linode Volume

Declaration
public Output<string> Label { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

Region

The region where this volume will be deployed. Examples are &quot;us-east&quot;, &quot;us-west&quot;, &quot;ap-south&quot;, etc. Changing region forces the creation of a new Linode Volume..

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Size

Size of the Volume in GB.

Declaration
public Output<int> Size { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Status

The status of the volume, indicating the current readiness state.

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.