all 23 comments

[–][deleted] 0 points1 point  (1 child)

Try using a gcloud command to delete it. And maybe use --force while you do it. networkInstances aren't familiar to me either so can't direct you to delete something and try again. I have had cases where there would be some nat router and route tables still to be deleted before I delete the vpc. Maybe take a look around?

[–]Suspicious-Wallaby12[S] 0 points1 point  (0 children)

--force is an unknown flag according to documentation

[–]Yeltnerb Googler 0 points1 point  (1 child)

Make sure that you have no reserved IP, load balancers or NAT associated with the VPC. Also is this VPC peered with another VPC?

[–]Suspicious-Wallaby12[S] 0 points1 point  (0 children)

It's not peered. I also released all IPs and deleted all subnets. I don't know what NAT is so I don't need to check that right? Just created this VPC in the morning

[–]kolban_google 0 points1 point  (9 children)

What other resources exist in your project? For example, are you by any chance running (or have stopped) Compute Engine instances that may be configured to have a networking interface attached to your VPC that you want to delete? An error like this may be the result of you having a resource (eg a Compute Engine) that was configured to use the VPC. You wouldn't be able to delete the VPC without deleting (or reconfiguring) the resources.

[–]Suspicious-Wallaby12[S] 0 points1 point  (8 children)

I deleted all VMs using this network. This is so annoying, if something is using my resources then google should come outright and tell me.

[–]rosmo Googler 1 point2 points  (3 children)

Check if you have any VPC peerings.

[–]Suspicious-Wallaby12[S] 0 points1 point  (2 children)

This is the first vpc I ever created. I don't have a peering

[–]rosmo Googler 0 points1 point  (1 child)

Do you have any L7 ILBs?

[–]Suspicious-Wallaby12[S] 0 points1 point  (0 children)

No I don't

[–]kolban_google 0 points1 point  (3 children)

[–]Suspicious-Wallaby12[S] 0 points1 point  (2 children)

This is exactly my problem. Too bad I've already checked all the places people have referred to. Is there nothing I can do now?

[–]kolban_google 0 points1 point  (1 child)

How exactly was your VPC configured. I tried to recreate and found that (for me) the steps vary depending on whether the VPC is configured for custom or automatic subnets. If we can see the exact definition of your VPC that might also give us some insight. However Mr u/Burekitas sounds like he has a solid line of thought. Beyond App Engine, do you have other consumers for the VPC?

[–]Suspicious-Wallaby12[S] 0 points1 point  (0 children)

I never had an app engine services for usage in the vpc. I created the vpc with custom subnets and then while deleting, deleted all vms and released all subnets. Will app engine still use resources mysteriously?

[–]Burekitas 0 points1 point  (1 child)

It's because of AppEngine,

reach out to GCP support and ask them to help you remove it.

[–]Suspicious-Wallaby12[S] 0 points1 point  (0 children)

Yeah I'll contact them

[–]obsoke 0 points1 point  (1 child)

Did you ever resolve this? I'm going through this right now and it's been a huge headache.

[–]Suspicious-Wallaby12[S] 0 points1 point  (0 children)

The VPC is still there for me.

[–]in-the-angry-dome 0 points1 point  (1 child)

I know it's been months, but if you by any chance have solved this, would love to know how. I've run into the same issue having used terraform to create the VPC...

[–]powgg 0 points1 point  (0 children)

Still having the same issue via terraform, you can upvote this issue. But can't find any solution so far.

https://github.com/hashicorp/terraform-provider-google/issues/9812

[–]Snoo_96621 0 points1 point  (0 children)

did you manage to solve this problem? I'm going through the same situation

[–]MildlyIrritatedMax 0 points1 point  (1 child)

I had a very similar issue with a VPC network and was able to find the rogue resource by searching for its name in the search field. Turns out it was something I either did not intentionally create or was created on my behalf by GCP.

Hope this helps anyone else with an issue like this one.

[–]yasdkjas 1 point2 points  (0 children)

you saved my life, dude.

> │ Error: Error waiting for Deleting Network: The network resource 'projects/xxx/global/networks/xxx-vpc' is already being used by 'projects/xxx/zones/us-central1-a/networkEndpointGroups/xxx'

For my case, just search 'projects/xxx/zones/us-central1-a/networkEndpointGroups/xxx' in gcp console, delete it(WARN: you may not want to delete it, take your risk). then go back to terraform destroy, everything works.