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