Learn how to permanently remove a Vultr Load Balancer from your account when its no longer needed.
Deleting a Vultr Load Balancer involves removing the Load Balancer from your Vultr account, which terminates its service and stops all associated traffic distribution. This action will cease the load balancing operations and clear any related configurations, effectively halting the management of incoming traffic across your servers.
Follow this guide to delete a Vultr Load Balancer on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List Load Balancers endpoint and note the target Load Balancer's ID.
$ curl "https://api.vultr.com/v2/load-balancers" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete Load Balancer endpoint to delete the target Load Balancer.
$ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List all available instances and note the target Load Balancer's ID.
$ vultr-cli load-balancer list
Delete the target Load Balancer.
$ vultr-cli load-balancer delete <load-balancer-id>
Open your Terraform configuration file for the existing Load Balancer.
Remove the vultr_load_balancer
resource block, or destroy it by target.
resource "vultr_load_balancer" "lb" {
region = "ewr"
label = "vultr-load-balancer"
balancing_algorithm = "roundrobin"
forwarding_rules {
frontend_protocol = "http"
frontend_port = 82
backend_protocol = "http"
backend_port = 81
}
health_check {
path = "/test"
port = 8080
protocol = "http"
response_timeout = 1
unhealthy_threshold = 2
check_interval = 3
healthy_threshold = 4
}
}
# To delete, either remove this block from configuration
# or run: terraform destroy -target vultr_load_balancer.lb
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
No comments yet.