Unable to Delete VPC

41 views
Skip to first unread message

Riddhesh Ganatra

unread,
Oct 14, 2021, 5:49:33 AMOct 14
to gce-discussion
When I try to delete a VPC it keeps throwing below error :
The network resource 'projects/<project-id>/global/networks/<vpc-name>' is already being used by 'projects/<project-id>/global/networkInstances/v-xxxxxxxx-xxxxxxxx-......'

How do I find the above resource?

The SUBNETS, STATIC INTERNAL IP ADDRESSES, FIREWALL POLICIES, FIREWALL RULES, ROUTES, VPC NETWORK PEERING, PRIVATE SERVICE CONNECTION are all empty for the selected VPC

Any help is much appreciated. Thanks.

Untitled.png

Fredrick Sachita

unread,
Oct 14, 2021, 9:57:08 AMOct 14
to Riddhesh Ganatra, gce-discussion
Hello Riddhesh,

I trust you are well.

Below is a work around:
  1. There are resources in your project which are using the VPC, i.e Compute instances still running which are on the network you are trying to delete. Check the Compute instances section and first stop all running instances, then you can proceed to delete the VPC. Note once you delete the VPC you will be unable to start the instances hence you will be required to create a new VPC then add the instances initially de-allocated from the deleted VPC to the newly created VPC.
Hope this helps.

Kind Regards,



--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/091fd929-d133-40f8-81be-c0fce0286428n%40googlegroups.com.


--

Alejandro Melian Llorente

unread,
Oct 15, 2021, 1:10:39 PMOct 15
to gce-discussion

Hello,

Hope you are fine.

Another option that I can see:


1.- Try to check all your compute instances that still are running on the network you are trying to delete and identify them.

2.- Once you have localized the VM, try to create a new VPC network for this VM’s.

3.- On every VM you had identified on the step 01, Delete the network and associate with the new VPC network created.

4.- At this point, any VM will be not running on the network you are trying to delete.

5.- You should have the possibility to delete the VPC network that you were trying to delete.


Hope this information can help you.


Kind Regards,

Alejandro.

Reply all
Reply to author
Forward
0 new messages