Reserved IP addresses enable you to reserve a specific public IP address you can attach to instances. You can attach multiple reserved IPs on a single instance to enable new network interfaces.
Follow this guide to attach reserved IPs on a Vultr Cloud GPU instance using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List Instances endpoint and note the target instance's ID in your output.
$ curl "https://api.vultr.com/v2/instances" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the List Reserved IPs endpoint and note the target reserved IP's ID in your output.
$ curl "https://api.vultr.com/v2/reserved-ips" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Attach Reserved IP endpoint to attach the reserved IP to the instance.
$ curl "https://api.vultr.com/v2/reserved-ips/{reserved-ip}/attach" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"instance_id" : "<instance-id>"
}'
List all reserved IPs in your Vultr account and note the target reserved IP's ID.
$ vultr-cli reserved-ip list
List all instances in your Vultr account and note the target instance's ID.
$ vultr-cli instance list
Attach the reserved IP to the instance.
$ vultr-cli reserved-ip attach <reserved-ip-id> --instance-id <instance-id>
Open your Terraform configuration for the existing Cloud GPU instance.
Update the reserved_ip_id
value in the instance resource to the ID of the target reserved IP.
resource "vultr_instance" "gpu" {
# ...existing fields (region, plan, label, etc.)
reserved_ip_id = "your-reserved-ip-id"
}
Or create a new reserved IP in Terraform and attach it to the instance:
resource "vultr_reserved_ip" "gpu_ip" {
region = "del"
ip_type = "v4"
label = "gpu-reserved-ip"
}
resource "vultr_instance" "gpu" {
# ...existing fields (region, plan, os_id, label, etc.)
reserved_ip_id = vultr_reserved_ip.gpu_ip.id
}
Apply the configuration and observe the following output:
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
No comments yet.