Linode Block Storage Volume
Attachable, resizable NVMe block volume with safe attach/detach lifecycle handling.
Verification
Plan-validatedPassed: module logic verified on a mocked plan — inputs, validation rules, conditional creation and outputs resolve (no real provider, no cloud).
Conformance
- Static validation (fmt · validate · tflint)
- Security scan: findings disclosed (Checkov)
- Plan tests (mocked: validation rules · outputs)
Provenance
- SHA-256 checksum
- Signature (pending)
Functional
- Live test pending (no cloud run yet)
Last verified 2026-06-28 · how we verify
Documentation
linode-volume
Status: static-validated, live-test pending. Ships under live-test quarantine — no Linode cloud sandbox is wired into the gate yet. Static validation (fmt, validate, tflint) is green.
Attachable, resizable Linode Block Storage NVMe volume with Block Storage
Disk Encryption on by default and safe attach/detach lifecycle handling.
Optionally clones from an existing volume. Pairs with the linode-instance
module. Works with Terraform and OpenTofu (>= 1.6), Linode provider
>= 3.14, < 4.0.
Secure defaults
- Encryption at rest enabled by default (
encryption = true). The region must support Block Storage Disk Encryption. - Detached by default. With no
linode_id, the volume is created unattached; setlinode_idto attach it to an instance (in the same region). - Grow-only guardrail. A plan-time precondition rejects sizes below the 10 GB floor; volumes can only be resized larger, never smaller, so a shrink is caught before the API rejects it.
- Clone-aware region handling. When
source_volume_idis set the clone inherits the source region andregionis ignored; a precondition requires aregiononly when not cloning.
Usage
module "data" {
source = "./linode-volume"
label = "app-data"
region = "us-ord"
size = 100
# Attach to an instance (omit to create detached).
linode_id = module.web.instance_id # linode-instance module
tags = ["env:prod"]
}
# Mount path on the attached instance:
# module.data.filesystem_path -> /dev/disk/by-id/scsi-0Linode_Volume_app-data
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
label | string | — | Volume label, 1-32 chars, starts with a letter (required) |
region | string | null | Linode region (required unless cloning) |
size | number | 10 | Volume size in GB (10-10240); grow-only |
linode_id | number | null | Instance to attach to (null = detached) |
encryption | bool | true | Block Storage Disk Encryption at rest |
source_volume_id | number | null | Volume to clone (inherits source region) |
tags | list(string) | [] | Organizational tags |
Outputs
| Name | Description |
|---|---|
volume_id | Volume ID |
label | Volume label |
region | Region the volume resides in |
size | Size in GB |
status | Volume status (creating/active/resizing/contact_support) |
linode_id | Attached instance ID (null when detached) |
filesystem_path | /dev/disk/by-id path to mount on the instance |
encryption | Whether encryption is enabled |
Requirements
- Terraform or OpenTofu
>= 1.6 linode/linodeprovider>= 3.14, < 4.0- A Linode personal access token with Volumes write scope (
LINODE_TOKENor the providertoken). encryption = truerequires a region with Block Storage Disk Encryption support.
Verification
Static-validated (fmt, validate, tflint). Live apply/destroy testing pending cloud sandbox availability — see catalog status.
License
Commercial — LicenseRef-IaCBazaar-Commercial. IaC Bazaar EULA. © IaC Bazaar.
Original work (not derived from a third-party module).