Set "Delete boot disk when instance is deleted" to "false" by default
Not sure whose idea it was to prefer convenience over permanent data destruction in the defaults for creating a new VM. The default should be safe and forgiving, not deadly.
Thanks, we understand your point of view, and definitely choosing defaults is difficult to do. We will evaluate your suggestion, but please understand that it may be difficult to change, since it could be considered a breaking change to the API (many customers no doubt rely on assumptions of the current behavior at this point).
NO nAME commented
So, if it's the other way, & they don't delete boot disks, it would leave lingering disks in users projects, charging them for their usage without them knowing. It sounds pretty scummy to have a default like that where Google benefit from users in-experience. Usually when people delete machines, they wouldn't imagine the disk as a separate entity which they need to delete when all they did to create the disk was to only create the instance. I'm not affiliated with Google, just a passer-byer playing devils advocate
That would be rather cruel which is why we do provide that functionality:
- in the UI, click the instance in your list of instances to go to the details page
- on the details page, click Edit at the top, scroll down until you see a checked box labeled "Delete boot disk when instance is deleted", uncheck it, then scroll the rest of the way down and click Save (if you have multiple disks attached to the instance, the list of disks will be displayed and you can set the behavior for each via the "When deleting instance: dropdowns).
- you can also use the gcloud compute instances set-disk-auto-delete
We also provide warnings in the UI and gcloud that warn you about disks that will be auto-deleted when you go to delete your instance.
Jon Gorrono commented
It is arguably cruel if you can see the destruction coming with nothing to do about it: there seems to be no way to uncheck the 'Delete boot disk when instance is deleted ' box once an instance is created (plus gawd knows what else was configured on it).