op = computeClient.networks().delete(projectID, "vpc-f2a31cb3-486d-42cd-bafa-8c8726e5897f").execute();
For some reason, the gcp console is recognizing the deletion request and it keeps saying that the network has been deleted, but it's always still there. In the past, I have been able to delete VPCs but it's been hit-or-miss. Sometimes the deletion is fast, other times slow, and sometimes it won't delete at all. Is this because the API is in the alpha stage of development, or is my API call malformed? Or some other reason? Anything you can say to help would be appreciated.
Thanks,
Adam Smith
Hello Adam,
As per the cloud documentation[1], before deleting a VPC network, you have to delete any VMs or other resources (like firewall rules) that are still using the VPC network or subnet. Can you please confirm concerned VPC does not have any such resources attached?
I tried to reproduce your issue but unable to do so as I can delete a VPC network (without any resource attached) via compute engine API[2]. I am getting 200 OK response to my delete API request. Can you please confirm what error message or code you are getting while execution?
Can you please confirm which API version you are using (v1 or beta)?
[1]: https://cloud.google.com/vpc/docs/using-vpc#deleting_a_subnet_or_vpc_network
[2]: https://cloud.google.com/compute/docs/reference/latest/networks/deleteFor the required (or expected) error response, you may raise a customer issue or bug on Google public issue tracker[1] platform along with relevant logs and error screenshots. Google PIT is meant for bugs, customer issue and feature requesting tracking.
[1]: https://issuetracker.google.com