🛡️ Google GCE Disk is idle🟢
- Contextual name: 🛡️ Disk is idle🟢
- ID:
/ce/ca/google/compute-engine/disk-idle - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
COST
Logic
Description
Description
This policy identifies GCE persistent disks that are not attached to any Compute Engine instance and have remained unused for more than 30 days.
Rationale
Unattached persistent disks can accumulate in a project, leading to unnecessary storage costs if left unmanaged.
Impact
Before deleting a disk, confirm that it is not reserved for future use, retained for compliance purposes, or required for backup and disaster recovery. Deleting disks without validation may result in irreversible data loss.
Audit
This policy marks a Google GCE Disk as INCOMPLIANT if:
- The disk doesn't have a related Google GCE Attached Disk.
- The disk's
lastAttachTimestampis empty.- The
lastDetachTimestampis more than 30 days old.Disks of
TypeSCRATCH are marked asINAPPLICABLE.
Remediation
Remediation
Before deleting a persistent disk, confirm that it is not required for current or planned services. Coordinate with application owners or your operations team to ensure the disk is not reserved for a future deployment or used for failover, archival, or compliance purposes.
Archive the Disk
Using gcloud CLI
If the disk must be retained for compliance or future recovery, create an image or snapshot before deletion:
gcloud compute disks snapshot {{disk-name}} \
--zone {{zone}} \
--snapshot-names {{snapshot-name}} \
--project {{project-id}}Release an Unused Persistent Disk
Using gcloud CLI
Permanently remove an unused persistent disk
gcloud compute disks delete {{disk-name}} \
--zone {{zone}} \
--project {{project-id}}
policy.yaml
Linked Framework Sections
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| 💼 Cloudaware Framework → 💼 Waste Reduction | 25 | no data |