You are deploying a production application on Compute Engine.
You want to prevent anyone from accidentally destroying the instance by clicking the wrong button.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.A.
https://googlecloudplatform.uservoice.com/forums/302595-compute-engine/suggestions/14227521-set-delete-boot-disk-when-instance-is-deleted-toThe correct answer to the question is B. Enable delete protection on the instance.
Explanation:
Compute Engine is a virtual machine (VM) instance that runs on Google's cloud infrastructure. It provides a scalable, high-performance, and reliable environment for deploying applications. However, it is important to take precautions to prevent accidental deletion of instances. Here are the details on each of the answer options:
A. Disable the flag Delete boot disk when instance is deleted: This option prevents the deletion of the boot disk when the instance is deleted, but it does not prevent the instance from being deleted.
B. Enable delete protection on the instance: This option provides an extra layer of protection against accidental deletion of instances. When delete protection is enabled, a user must explicitly disable it before deleting the instance.
C. Disable Automatic restart on the instance: This option prevents the instance from automatically restarting after a maintenance event or a system failure, but it does not prevent the instance from being deleted.
D. Enable Preemptibility on the instance: This option makes the instance eligible for being terminated by Compute Engine when resources are needed. It is useful for running batch jobs that can be interrupted without any adverse effects.
Therefore, the best option to prevent accidental deletion of instances is to enable delete protection on the instance. This can be done by selecting the "Enable deletion protection" option when creating the instance, or by editing the instance and enabling the deletion protection.