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.
Send a GET
request to the List Reserved IPs endpoint and note the target Reserved IP's ID.
$ curl "https://api.vultr.com/v2/reserved-ips" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Detach Reserved IP endpoint to detach the Reserved IP from the instance.
$ curl "https://api.vultr.com/v2/reserved-ips/{reserved-ip-id}/detach" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List all active Reserved IPs in your Vultr account and note the target Reserved IP's ID.
$ vultr-cli reserved-ip list
Detach the Reserved IP from the instance.
$ vultr-cli reserved-ip detach <reserved-ip-id>
Open your Terraform configuration for the existing Reserved IP.
Remove instance_id
from the vultr_reserved_ip
to detach, then apply.
resource "vultr_reserved_ip" "rip" {
region = "ewr"
ip_type = "v4"
label = "web-rip"
# instance_id removed to detach
}
Apply the configuration and observe:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
No comments yet.