Skip to main content

โญ Repository โ†’ ๐Ÿ“ Compliance Engine โ†’ ๐Ÿ“ CloudAware โ†’ ๐Ÿ“ Google โ†’ ๐Ÿ“ GCE

๐Ÿ›ก๏ธ Google GCE Snapshot is 90 days old or more๐ŸŸข

  • Contextual name: ๐Ÿ›ก๏ธ Snapshot is 90 days old or more๐ŸŸข
  • ID: /ce/ca/google/compute-engine/snapshot-90-days-old
  • Tags:
  • Policy Type: COMPLIANCE_POLICY
  • Policy Categories: COST

Logicโ€‹

Descriptionโ€‹

Open File

Descriptionโ€‹

This policy identifies Google GCE Snapshots that are 90 days old or older. These snapshots are flagged for potential deletion or archival to optimize storage utilization and support effective data lifecycle management practices.

Rationaleโ€‹

Stale snapshots can accumulate over time, generating unnecessary storage costs without providing meaningful value for disaster recovery or data restoration. By removing or archiving outdated snapshots, you can reduce their cloud storage footprint and lower monthly expenses.

Impactโ€‹

Failure to manage old snapshots results in ongoing storage charges for data that may no longer be relevant. Additionally, retaining a large number of outdated snapshots can complicate recovery processes by making it more difficult to identify the correct snapshot for restoration.

Auditโ€‹

This policy flags an Google GCE Snapshot as INCOMPLIANT if its Creation Date exceeds 90 days.

GCE Snapshots with a Status other than READY are marked as INAPPLICABLE.

Remediationโ€‹

Open File

Remediationโ€‹

Old snapshots should managed through automated schedules for ongoing governance.

Create a Snapshot Lifecycle Policyโ€‹

To prevent accumulation of old snapshots, configure a snapshot schedule for your persistent disks. This schedule automates snapshot creation and cleanup, ensuring future snapshots older than a set duration (e.g., 90 days) are automatically deleted.

Using gcloud CLIโ€‹
  1. Create a snapshot schedule:
gcloud compute resource-policies create snapshot-schedule {{schedule-name}} \
--region={{region}} \
--start-time={{13:00}} \
{{--daily-schedule | --hourly-schedule={{hours}} | --weekly-schedule={{weekly-cycle}}}} \
--max-retention-days={{90}} \
--on-source-disk-delete=apply-retention-policy
  1. Attach the schedule to a persistent disk:
gcloud compute disks add-resource-policies {{disk-name}} \
--resource-policies={{schedule-name}} \
--zone={{zone}}

Note: Existing snapshots older than 90 days are not retroactively deleted when applying a schedule, they must be handled manually.

... see more

policy.yamlโ€‹

Open File

Linked Framework Sectionsโ€‹

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
๐Ÿ’ผ Cloudaware Framework โ†’ ๐Ÿ’ผ Waste Reduction25no data