Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt

Use this file to discover all available pages before exploring further.

Updated May 8, 2026 Manages a Raff Virtual Machine — Linux or Windows, with NVMe SSD disks, optional SSH keys / password, optional VPC attachment, and optional backup schedule. Pricing plans range from 3.99/mo(Premium1vCPU/1GiB)to3.99/mo (Premium 1 vCPU / 1 GiB) to 511.99/mo (Premium 32 vCPU / 128 GiB) — see the Pricing page for the full list.

Example — minimal

resource "raff_vm" "web" {
  name        = "web-01"
  template_id = "<ubuntu-2404-template-uuid>"
  pricing_id  = 9                 # Standard 2 vCPU / 4 GiB / 50 GiB ($4.99/mo)
  region      = "us-east"
  ssh_keys    = ["<ssh-key-id>"]
}

Example — full

resource "raff_vm" "api" {
  name        = "api-prod-01"
  template_id = "<ubuntu-2404-template-uuid>"
  pricing_id  = 10                  # Standard 4 vCPU / 8 GiB / 120 GiB
  region      = "us-east"

  # Auth — pick one
  ssh_keys = ["<ssh-key-id-alice>", "<ssh-key-id-ci>"]
  # password = var.vm_root_password   # alternative

  # Extra block storage (in addition to the plan's base disk)
  extra_storage      = 100   # GiB
  extra_storage_type = "ext4"

  # Backups
  backup_type = "daily"
  backup_time = "3am"
  # backup_date = "Saturday"  # only used when backup_type = "weekly"

  # Networking — opt into a shared VPC
  vpc_id = raff_vpc.prod.id   # if vpc resource is added later

  # Or create a VPC inline at the same time
  # vpc_name = "prod-services"
  # vpc_cidr = "10.7.0.0/24"

  # Tags
  tags = ["api", "prod", "team-platform"]

  # Cleanup behavior on destroy
  volume_action = "detach"   # "detach" (preserves volumes) or "delete"
  delete_vpc    = false      # whether to delete attached VPC on destroy
}

Argument reference

Required

ArgumentTypeDescription
namestringVM name. Changing this renames the VM in place
template_idstring (UUID)OS template to install. Get from List Templates
pricing_idintPlan ID (1–13). Changing this resizes the VM (compute and storage). See Pricing for the full plan list
regionstringData center region — currently us-east only

Optional — auth

ArgumentTypeDescription
ssh_keyslist(string)SSH key IDs to install. Get key IDs from the dashboard’s SSH Keys page
passwordstringRoot (Linux) or Administrator (Windows) password. Mutually exclusive with ssh_keys for some templates

Optional — storage

ArgumentTypeDescription
extra_storageintExtra block storage in GB, attached as a separate volume
extra_storage_typestringFilesystem for the extra volume — ext4, xfs, or btrfs (Linux)

Optional — backups

ArgumentTypeDescription
backup_typestringnone (default), daily, or weekly
backup_timestringWhen the backup runs, e.g. 3am, 8pm (UTC)
backup_datestringDay of the week for weekly backups, e.g. Saturday

Optional — networking

ArgumentTypeDescription
vpc_idstring (UUID)Attach the VM to an existing VPC
vpc_namestringCreate a new VPC inline at the same time as the VM (requires vpc_cidr)
vpc_cidrstringCIDR for the inline-created VPC. Allowed prefixes /16/28, RFC 1918 + RFC 6598 ranges

Optional — tags and lifecycle

ArgumentTypeDescription
tagslist(string)Tags applied to the VM
volume_actionstringOn terraform destroy: detach (keep volumes, default) or delete (remove with the VM)
delete_vpcboolOn terraform destroy: also delete attached VPCs (subject to shared-VPC safety — see Delete a VM)

Attribute reference (computed)

AttributeDescription
idVM UUID
statusLifecycle state (active, passive, provisioning, etc.)
cpuNumber of vCPUs (mirrors the chosen pricing_id)
ramRAM in GB
storageBase disk size in GB
added_storageExtra storage in GB (mirrors extra_storage)
total_storageSum of base + added
template_nameOS template name
template_versionOS version (e.g. 24.04)

Lifecycle

OperationBehavior
terraform apply (create)Creates VM, waits for active status, returns the UUID
Change nameIn-place rename
Change pricing_idIn-place resize — VM reboots once. Plan compares old vs new, charge prorates against the current term
Change template_idReinstall — wipes the OS disk, preserves attached volumes / IP / VPC / tags. See Reinstall
Change regionReplacement — Terraform destroys and recreates (regions are immutable on a VM)
Change tags, backup_*In-place updates
terraform destroyDeletes the VM. Volumes preserved by default (volume_action = "detach"); set to "delete" to also remove. VPCs preserved unless delete_vpc = true

Importing existing VMs

terraform import raff_vm.web <vm-uuid>
Then write a matching resource block. Run terraform plan to confirm.

Permissions

The API key used by Terraform needs vm.create, vm.manage, vm.power, and (for destroy) vm.delete in the project where the VM lives. The System role Project Admin grants all of these. For tighter-scoped automation, build a Custom role with just the project-domain VM permissions you need.

raff_project

Project resource — set on raff_vm via project_id.

VM Pricing

The full Standard / Premium plan list with pricing IDs.

Create a VM

Dashboard equivalent — useful for understanding fields.
Last modified on May 8, 2026