Loading…
Loading documentation...
Import, manage, drift-detect, and destroy existing servers with Terraform via the community restapi module; create new servers in the dashboard.
Manage your existing Servers Are Up fleet as code. Today this works through a Terraform module at integrations/terraform/ that wraps the community Mastercard/restapi provider and talks to the REST API v1. You can import, manage, drift-detect, and destroy existing instances, and read the catalog (plans, regions, images) as Terraform data.
What Terraform does — and does not — do today. The module manages servers that already exist. It does not create new servers, so
terraform applywill not stand up a brand-new instance. Buy the server in the dashboard or at checkout, then import it into Terraform state. The native Go provider is Coming soon; source exists inpackages/terraform-provider/, but no provider is published to the Terraform Registry.
The module uses the community REST-API provider under the hood. Authenticate with a personal access token — scope instances:read to read and plan, instances:write to manage or destroy. Create one under API keys.
terraform {
required_providers {
restapi = {
source = "Mastercard/restapi"
version = "~> 1.20"
}
}
}
provider "restapi" {
uri = "https://serversareup.com/api/v1"
write_returns_object = true
headers = {
Authorization = "Bearer ${var.sau_api_token}"
"Content-Type" = "application/json"
}
}
variable "sau_api_token" {
type = string
sensitive = true # export TF_VAR_sau_api_token=sau_...
}
Best practice: keep your token in an environment variable or secrets manager (
TF_VAR_sau_api_token) — never commit it.
export TF_VAR_sau_api_token="sau_xxxxxxxxxxxxxxxxxxxx"
cd integrations/terraform
terraform init
Grab the instance id from the dashboard or the API (GET /api/v1/instances), then bring it under management:
terraform import restapi_object.web ins_abc123
terraform plan
Terraform reconciles your configuration against the live state of your fleet and reports what has drifted. Nothing changes until you run terraform apply — and apply manages existing resources; it does not provision new ones.
terraform destroy
Reference real plan, region, and image ids by reading the catalog through the same provider:
# Products with exact public status
data "restapi_object" "plans" {
path = "/products"
search_key = "type"
search_value = "vps"
}
See integrations/terraform/README.md for the exact resource addresses, variables, and worked examples that ship with the module.
A native provider built on terraform-plugin-framework lives at packages/terraform-provider/, but it is Coming soon and is not on the Terraform Registry. It remains outside the supported public path until both the provider and exact create/apply lifecycle are Available.
Open the workspace to check your machine’s connection and available controls. For automation, consult the REST API or MCP guide. Include the resource and region when you contact support.