Server Scaling
Scale virtual servers in place by changing their plan without reprovisioning. The provider uses the ScaleServer API to upgrade or downgrade CPU, RAM, and disk while preserving the server's IP address.
How It Works
When you change the plan attribute on a netactuate_server resource, the provider calls the ScaleServer API instead of destroying and recreating the server. This preserves the server's IP address, hostname, and data.
No separate repository is needed -- server scaling uses the existing netactuate_server resource from the compute module.
Example
Start with a small plan:
resource "netactuate_server" "app" {
hostname = "app-01"
plan = "VR1x1x25"
location = "SJC"
image = "5787"
ssh_key_id = var.ssh_key_id
}
Scale up by changing the plan variable:
resource "netactuate_server" "app" {
hostname = "app-01"
plan = "VR2x2x25"
location = "SJC"
image = "5787"
ssh_key_id = var.ssh_key_id
}
terraform apply
Terraform detects the plan change and calls the ScaleServer API. The server is resized without changing its IP address.
Reboot Behavior
The allow_reboot attribute controls whether the server can be rebooted during scaling. It defaults to true.
resource "netactuate_server" "app" {
hostname = "app-01"
plan = "VR2x2x25"
location = "SJC"
image = "5787"
ssh_key_id = var.ssh_key_id
allow_reboot = true
}
- CPU and disk upgrades typically do not require a reboot.
- RAM downgrades require a reboot to take effect. If
allow_rebootis set tofalseand the scaling operation requires a reboot, the operation will fail.
IP Preservation
The server's primary IPv4 and IPv6 addresses are preserved across scaling operations. DNS records, firewall rules, and any other configurations referencing the server's IP continue to work without changes.
Need Help?
If you need assistance with server scaling, visit our support page.