Question: How to Detach Reserved IPs from a Vultr Instance
A guide explaining how to remove a Reserved IP address from a Vultr instance while keeping the IP in your account for future use.
Detaching a Reserved IP from an instance removes the associated public network address from the instance's main network interface. You can detach a Reserved IP to reassign it to another instance, release unused resources, or adjust your network configuration.
Follow this guide to detach Reserved IPs from a Vultr instance using the Vultr Customer Portal, API, CLI, or Terraform.
Vultr Customer Portal
1.Navigate to Products, expand the Network drop-down, and select Reserved IPs from the list of options.
2.Click your target Reserved IP to open its management page.
3.In the Attached to Server section, click Detach to begin removing the Reserved IP from the instance.
4.Click Detach Reserved IP in the confirmation prompt to finalize the detachment.
Vultr API
1.Send a GET request to the List Reserved IPs endpoint and note the target Reserved IP's ID.
console
$ curl "https://api.vultr.com/v2/reserved-ips" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
2.Send a POST request to the Detach Reserved IP endpoint to detach the Reserved IP from the instance.
console
$ curl "https://api.vultr.com/v2/reserved-ips/{reserved-ip-id}/detach" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Vultr CLI
1.List all active Reserved IPs in your Vultr account and note the target Reserved IP's ID.
console
$ vultr-cli reserved-ip list
2.Detach the Reserved IP from the instance.
console
$ vultr-cli reserved-ip detach <reserved-ip-id>
Terraform
1.Open your Terraform configuration for the existing Reserved IP.
2.Remove instance_id from the vultr_reserved_ip to detach, then apply.
terraform
resource "vultr_reserved_ip" "rip" {
region = "ewr"
ip_type = "v4"
label = "web-rip"
# instance_id removed to detach
}
3.Apply the configuration and observe:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.