Soru

Zorluk: ZorManaging Compute Engine Resources

An organization operates a cluster of stateful application servers on Google Compute Engine. The operations team needs to establish a automated, maintenance-free persistent disk backup strategy that takes daily snapshots of all data disks and automatically deletes snapshots older than 30 days. The solution must adhere to the principle of least privilege and avoid administrative overhead from managing custom scripts or third-party cron schedulers. Which approach aligns with Google-recommended best practices for managing Compute Engine resources?

  1. Create a Compute Engine Resource Policy that defines a daily snapshot schedule with a 30-day auto-delete retention policy, and attach this policy to each persistent disk.Cevap
  2. B
    Migrate the stateful Compute Engine instances to Spot VMs so that Google Cloud automatically triggers persistent disk snapshots prior to preemption events.
  3. C
    Grant the primitive Owner role to a dedicated VM service account and execute a daily cron job running gcloud compute disks snapshot with a custom deletion script.
  4. D
    Recreate the persistent disks in a new Google Cloud region each day to bypass regional snapshot storage limits without submitting a formal quota request.

Cevap

Creating a Compute Engine Resource Policy defining a daily snapshot schedule with a 30-day retention period and attaching it to the persistent disks is the Google-recommended best practice.
Compute Engine Resource Policies allow cloud administrators to define automated backup schedules and retention windows directly on persistent disks. This native mechanism manages snapshot creation and deletion without requiring custom scripts, cron jobs, or elevated service account permissions.

Adım Adım Çözüm

1
Identify native Google Cloud features for automated disk lifecycle management.
Compute Engine Resource Policies provide built-in snapshot scheduling and automatic retention management.
Using native service capabilities eliminates the need to maintain external cron scripts or third-party scheduling tooling.
2
Evaluate security and access management requirements.
Resource Policies execute within the Compute Engine management control plane without granting broad IAM privileges to workload service accounts.
This maintains strict adherence to the principle of least privilege.
3
Attach the resource policy to the targeted persistent disks.
Snapshots will automatically be generated according to the daily schedule and purged after 30 days.
This fulfills all backup and retention objectives with zero ongoing operational overhead.

Anahtar Kavram

Compute Engine Resource Policies for Persistent Disk Snapshot Schedules
Bu soruyu puanla