How to Delete a VPC Network from a Vultr Account
-
by Blog Admin
- 16
How to Delete a VPC Network from a Vultr Account
Permanently removes the selected resource from your Vultr account.
Deleting a Virtual Private Cloud (VPC) network removes routing information and deactivates the associated interfaces on any attached instances.
Follow this guide to delete a VPC network using the Vultr Customer Portal, API, CLI, or Terraform.
Vultr Customer Portal
- Navigate to Products, expand the Network drop-down and select VPC Networks from the list of options.
- Select your target VPC network to open its management page.
- Click Delete VPC Network.
- Click Delete VPC Network in the confirmation prompt to destroy the VPC network.
Vultr API
- Send a
GET
request to the List VPCs endpoint and note the target VPC network’s ID in your output.console$ curl "https://api.vultr.com/v2/vpcs" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}"
- Send a
DELETE
request to the Delete a VPC endpoint to destroy the target VPC network.console$ curl "https://api.vultr.com/v2/vpcs/{vpc-id}" \ -X DELETE \ -H "Authorization: Bearer ${VULTR_API_KEY}"
Vultr CLI
- List all VPC networks in your Vultr account and note the target VPC network’s ID.
console
$ vultr-cli vpc list
- Delete the VPC network.
console
$ vultr-cli vpc delete <vpc-id>
Terraform
- Open your Terraform configuration where the VPC is defined.
- Remove the
vultr_vpc
resource block, or destroy it by target.terraformresource "vultr_vpc" "net" { region = "ewr" description = "example-vpc" } # To delete, either remove this block from configuration # or run: terraform destroy -target vultr_vpc.net
- Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
How to Delete a VPC Network from a Vultr Account Permanently removes the selected resource from your Vultr account. Deleting a Virtual Private Cloud (VPC) network removes routing information and deactivates the associated interfaces on any attached instances. Follow this guide to delete a VPC network using the Vultr Customer…
How to Delete a VPC Network from a Vultr Account Permanently removes the selected resource from your Vultr account. Deleting a Virtual Private Cloud (VPC) network removes routing information and deactivates the associated interfaces on any attached instances. Follow this guide to delete a VPC network using the Vultr Customer…