Description
Ensure that Compute Engine VM instances have the Deletion protection setting enabled so that the instance cannot be accidentally or maliciously deleted without first explicitly disabling this protection.
Rationale
Without deletion protection, any principal with sufficient IAM permissions can delete a critical VM instance with a single action, potentially causing significant, immediate service disruption and data loss if the instance's disks are also configured to auto-delete. Enabling deletion protection adds a required, deliberate extra step before an instance can be removed, reducing the risk of accidental deletion through scripting errors, automation mistakes, or console misclicks.
Impact
Prevents accidental or unauthorized deletion of critical VM instances
Requires an explicit, deliberate step to disable protection before deletion is possible
Adds an operational step to legitimate decommissioning workflows, which must account for disabling this setting first
Default Value
Deletion protection is disabled by default on newly created Compute Engine VM instances.
Pre-Requisites
IAM permissions to view and edit Compute Engine instance settings (e.g., Compute Instance Admin)
Test Plan
Sign in to the Google Cloud Console at https://console.cloud.google.com.
Select the relevant project.
Navigate to Compute Engine > VM instances and select the instance to review.
Open the instance details.
Verify that Deletion protection is set to On.
If Deletion protection is set to Off for a production or critical instance, follow the implementation steps.
Implementation Steps
Sign in to the Google Cloud Console at https://console.cloud.google.com.
Select the relevant project.
Navigate to Compute Engine > VM instances and select the instance to update.
Select Edit.
Locate the Deletion protection setting and set it to On.
Click Save to apply the change.
Confirm the instance details now reflect Deletion protection as On.
Backout Plan
Sign in to the Google Cloud Console at https://console.cloud.google.com.
Select the relevant project.
Navigate to Compute Engine > VM instances and select the affected instance.
Select Edit.
Locate the Deletion protection setting and set it to Off.
Click Save to apply the change.
Reference