Terraform provider reference / resources / disk
fiberax_disk (Resource)
A DATA disk of a server.
The system disk is not managed by this resource: it is created together with the server and is not deleted separately, so its size lives in the disk_gb field of the server itself. One value cannot have two owners.
Any disk operation restarts the server, and deletion shuts it down unconditionally. A disk cannot be added unnoticed by a running service - that is a property of the platform.
Disks only grow. The platform cannot shrink them at all; the provider refuses such a change at plan time instead of destroying data silently.
On server types sold as ready-made plans (Solo Server) disks are not managed through the API: there the plan sets them.
Example Usage
# A data disk of a server. The system disk is set by a field on the server itself,
# not by this resource.
#
# ANY change to a disk - creating, growing, removing - RESTARTS the server.
resource "fiberax_disk" "data" {
server_id = fiberax_server.app.id
size_gb = 200
}
# A disk can only GROW. Shrinking is refused at plan time: the platform cannot shrink
# a disk, and silently keeping the old size would be a lie.
Schema
Required
server_id(Number) The server the disk belongs to. The platform cannot move a disk to another server, so changing this field recreates the resource - that is, it DESTROYS the disk together with its data and creates a new one.size_gb(Number) Disk size in gigabytes. It grows in place; the platform cannot shrink a disk.
Optional
timeouts(Block, Optional) (see below for nested schema)
Read-Only
id(String) Slot name (scsi1) - the same one shown in the client area. The slot is picked by the hypervisor, and it does not change for an existing disk.is_system(Boolean) True for the disk the operating system boots from. On this resource it is always false: the system disk is not managed by this resource.
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# The import ID for a disk is the server ID and the slot name, separated by a comma. terraform import fiberax_disk.data 10867,scsi1
Generated from the provider schema for version 0.3.0. How to install the provider: Terraform provider.