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.
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-0LinodeVolume” + the Volume label
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,
});
}
}
Coming soon!
import pulumi
import pulumi_linode as linode
foobaz = linode.Instance("foobaz",
region="us-west",
root_pass="3X4mp13",
tags=["foobaz"],
type="g6-nanode-1")
foobar = linode.Volume("foobar",
label="foo-volume",
linode_id=foobaz.id,
region=foobaz.region)import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const foobaz = new linode.Instance("foobaz", {
region: "us-west",
rootPass: "3X4mp13",
tags: ["foobaz"],
type: "g6-nanode-1",
});
const foobar = new linode.Volume("foobar", {
label: "foo-volume",
linodeId: foobaz.id.apply(id => Number.parseFloat(id)),
region: foobaz.region,
});Create a Volume Resource
new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);def Volume(resource_name, opts=None, label=None, linode_id=None, region=None, size=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:
- Label string
The label of the Linode Volume
- Region string
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- Linode
Id int The ID of a Linode Instance where the the Volume should be attached.
- Size int
Size of the Volume in GB.
- List<string>
A list of tags applied to this object. Tags are for organizational purposes only.
- Label string
The label of the Linode Volume
- Region string
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- Linode
Id int The ID of a Linode Instance where the the Volume should be attached.
- Size int
Size of the Volume in GB.
- []string
A list of tags applied to this object. Tags are for organizational purposes only.
- label string
The label of the Linode Volume
- region string
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- linode
Id number The ID of a Linode Instance where the the Volume should be attached.
- size number
Size of the Volume in GB.
- string[]
A list of tags applied to this object. Tags are for organizational purposes only.
- label str
The label of the Linode Volume
- region str
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- linode_
id float The ID of a Linode Instance where the the Volume should be attached.
- size float
Size of the Volume in GB.
- List[str]
A list of tags applied to this object. Tags are for organizational purposes only.
Outputs
All input properties are implicitly available as output properties. Additionally, the Volume resource produces the following output properties:
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, filesystem_path=None, label=None, linode_id=None, region=None, size=None, status=None, tags=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:
- Filesystem
Path string The full filesystem path for the Volume based on the Volume’s label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- Label string
The label of the Linode Volume
- Linode
Id int The ID of a Linode Instance where the the Volume should be attached.
- Region string
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- Size int
Size of the Volume in GB.
- Status string
The status of the volume, indicating the current readiness state.
- List<string>
A list of tags applied to this object. Tags are for organizational purposes only.
- Filesystem
Path string The full filesystem path for the Volume based on the Volume’s label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- Label string
The label of the Linode Volume
- Linode
Id int The ID of a Linode Instance where the the Volume should be attached.
- Region string
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- Size int
Size of the Volume in GB.
- Status string
The status of the volume, indicating the current readiness state.
- []string
A list of tags applied to this object. Tags are for organizational purposes only.
- filesystem
Path string The full filesystem path for the Volume based on the Volume’s label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- label string
The label of the Linode Volume
- linode
Id number The ID of a Linode Instance where the the Volume should be attached.
- region string
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- size number
Size of the Volume in GB.
- status string
The status of the volume, indicating the current readiness state.
- string[]
A list of tags applied to this object. Tags are for organizational purposes only.
- filesystem_
path str The full filesystem path for the Volume based on the Volume’s label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
- label str
The label of the Linode Volume
- linode_
id float The ID of a Linode Instance where the the Volume should be attached.
- region str
The region where this volume will be deployed. Examples are
"us-east","us-west","ap-south", etc. Changingregionforces the creation of a new Linode Volume..- size float
Size of the Volume in GB.
- status str
The status of the volume, indicating the current readiness state.
- List[str]
A list of tags applied to this object. Tags are for organizational purposes only.
Package Details
- Repository
- https://github.com/pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.