Terraform
Managed from: My Profile, Account settings, Security, API keys. 4 answers, updated 24 November 2026.
Essentials 1
How do I use Terraform with VPS Minute?
Declare the vps-minute.com/vps-minute/vpsminute provider in your configuration, give it an API key through the VPSMINUTE_API_KEY variable, then run terraform init, terraform plan and terraform apply.
Create an API key with the Read, Order, Network and Reinstall scopes: see How do I create an API key?. Add Power if some VPS must restart to join a private network.
Copy the starting configuration of the Terraform card, API keys page, into a main.tf file.

Terraform card of the API keys page: starting configuration to copy In a terminal, give the key (
export VPSMINUTE_API_KEY=vmk_…), then runterraform initto install the provider from our registry (vps-minute.com, signed archives) andterraform planto see what will be created, without ordering anything.terraform applyorders the VPS, paid with your balance, and waits until they run: one to two minutes for a Linux VPS.
Common errors
- "insufficient_balance": your balance is too low, nothing is ordered. Top up your balance, then run terraform apply again.
- "insufficient_scope": the key lacks one of the scopes of step 1. Create a key with these scopes.
- "Missing API key": the VPSMINUTE_API_KEY variable is not set in this terminal.
Guides 3
What can the provider describe?
Your VPS, SSH keys, firewalls, private networks and failover IPs. What you already created in the client area can be taken over with terraform import, without recreating anything.
VPS (
vpsminute_server):offer(offer name or number),os,location,ssh_key_ids,hostname. Changingoffermoves the VPS to a higher offer; changing the system, the location or the SSH keys replaces it with a new VPS, and terraform plan says so first.Firewall (
vpsminute_firewall): all the rules of a VPS, in order, anddefault_policy = "DROP"to close everything they do not open. A rule open to 0.0.0.0/0 also covers the IPv6 of the VPS.Private network (
vpsminute_private_network):server_idslists the connected VPS, all in the same location;restart_servers = truerestarts them so that their private interface shows up at once.Failover IP (
vpsminute_ip):location, thenserver_idto route it to a VPS; changingserver_idmoves it, removing it detaches it.Take over what exists:
terraform import vpsminute_server.web 5678with the VPS number; the same for an SSH key, a private network or an IP (their number) and for a firewall (the number of its VPS).
What does terraform destroy do?
It cancels the VPS at once (disks erased, no refund), removes the SSH keys, firewall rules and private networks, and cancels the failover IPs at the end of their paid period.
First run
terraform plan -destroy: it lists what would be deleted, without touching anything.terraform destroyasks for a confirmation, then deletes in order: IPs, firewalls and private networks first, VPS last.A cancelled failover IP stays yours until the end of its period: the Keep this IP button, My IPs page, undoes the cancellation.
Common errors
- A deleted VPS cannot be recovered: take a snapshot first if its data matters.
Which limits should I know?
A few platform rules, found in real tests: a private network is born with its first VPS, a VPS joins or leaves a network at its restart, and the API spaces out the changes made on the same VPS.
Private network: it is created by connecting its first VPS and disappears with the last one; a VPS is in one network at a time.
Restart: a connected or detached VPS gets or loses its private interface at its next restart;
restart_servers = truedoes it for you.Firewall: two identical rules make one, declare each rule once. Moving the first rule rebuilds the list: filtering then pauses for a few seconds.
Many changes at once on the same VPS (a firewall of twenty rules, for example): the API asks to wait, the provider waits on its own and resumes; terraform apply then takes a few minutes.
No answer here. Try the help center home page or open a ticket.
Can't find it? Open a ticket from your client area.