I have a situation to delete lot of VMs which was created in my GCP Project. But I need to delete all those VMs before I enable the billing.
Is this possible?
I tried with Cloud Shell, but No luck as the VM are Delete protection enabled.
I have a situation to delete lot of VMs which was created in my GCP Project. But I need to delete all those VMs before I enable the billing.
Is this possible?
I tried with Cloud Shell, but No luck as the VM are Delete protection enabled.
Copyright © 2021 Jogjafile Inc.
You can use the Cloud Console, Cloud Shell or GCP API to disable the Delete Protection first.
For Cloud Console, just go to Compute Engine > VM Instance > Click the instance to be edited > Click Edit > Uncheck "Enable Deletion Protection".
But for multiple VM's it is advisable to use the cloud shell instead. See the template below:
For example:
For more information about this topic, you can check this link. Toggling deletion protection