I want to delete a GCP vpc, I get:
Failed to delete the network. Error: Some of the resources are referenced by other existing resources and cannot be deleted.
How do I determine what these other existing resources
are?
I want to delete a GCP vpc, I get:
Failed to delete the network. Error: Some of the resources are referenced by other existing resources and cannot be deleted.
How do I determine what these other existing resources
are?
The resources that can be using a VPC network are the following:
the only way is to check each category manually and make sure that are not using the VPC.
For more information regarding each kind of resource, visit this documentation [1].
Cheers!
There are a lot of resources that relate directly to a VPC NW in GCP.
Two options of listing them:
--------------------------------------------
Subnetworks in Network alon-test-network:
--------------------------------------------
https://www.googleapis.com/compute/v1/projects/alon-lavian/regions/us-central1/subnetworks/alon-test-network
https://www.googleapis.com/compute/v1/projects/alon-lavian/regions/asia-east1/subnetworks/subnet-2
--------------------------------------------
Instances in VPC alon-test-network:
--------------------------------------------
instance-3, zone: us-central1-a
--------------------------------------------
FW rules in Network alon-test-network:
--------------------------------------------
alon-test-network-allow-custom
alon-test-network-allow-http
alon-test-network-allow-https
alon-test-network-allow-icmp
default-allow-ssh-alon
--------------------------------------------
Routes in Network alon-test-network:
--------------------------------------------
default-route-d957345c6aef02c8 destination range: 10.128.0.0/20
default-route-dcecf66e898091c4 destination range: 10.0.0.0/9
default-route-fa59cdb8270a46ab destination range: 0.0.0.0/0
--------------------------------------------
VPN GW in Network alon-test-network:
--------------------------------------------
alon-vpn
--------------------------------------------
Routers in Network alon-test-network:
--------------------------------------------
--------------------------------------------
Addresses in Network alon-test-network:
--------------------------------------------
alon-address ,users: ['https://www.googleapis.com/compute/v1/projects/alon-lavian/zones/us-central1-a/instances/instance-3']