GCP PCA: Cloud Storage classes, lifecycle, retention versus versioning — three shelves
Three controls on one bucket. The exam will offer you one word for all three.
Three controls on one bucket. The exam will offer you one word for all three.
§I — Frame: fourth PCA visit, object door
08-08 opened the hierarchy. 08-20 opened Compute. 09-01 opened BigQuery prune. Counter 10 mod 4 returns seat 2: GCP PCA. The leftover is object storage policy.
Cheatsheet classes: Standard, Nearline, Coldline, Archive. Retrieval cost rises as access frequency falls. Bucket names are globally unique. Know gcloud storage (and legacy gsutil) as the CLI surface.
§II — Lifecycle
Chapter-3 ships the rule shape you will meet in labs and scenarios:
| Action | Condition (example) |
|---|---|
| SetStorageClass → COLDLINE | age 30; matches STANDARD or NEARLINE |
| Delete | age 365 |
Lifecycle answers cost and cleanup. It does not answer legal hold. A Delete rule that fires inside a compliance window is an architecture defect, even when the JSON is valid.
§III — Retention versus versioning
PCA-Notes:
| Control | Protects | Allows |
|---|---|---|
| Retention policy | Deletion and changes for a period; lock makes period immutable | Overwrite only when policy permits |
| Object versioning | History of generations | Modification via new generations |
GCS objects are immutable at a generation. Overwrite creates a new generation when versioning is on. Retention locked means you cannot shorten the period to escape a delete need. The exam loves the swap: candidate picks versioning when the stem asked for undelete protection under retention, or picks retention when the stem asked for prior-generation recovery.
§IV — Worked scenario
A media archive must stay recoverable for one year, cold after 30 days, and must not be deleted by operators for seven years.
- Default or lifecycle path into Coldline/Archive after 30 days (Chapter-3 pattern).
- Retention period ≥ seven years; lock when policy is final.
- Versioning optional for overwrite history; add noncurrent delete rules if cost matters.
- Reject "only versioning" as the seven-year delete shield.
§V — Exam traps
- Treating Nearline as free storage with no retrieval cost.
- Using lifecycle Delete as a compliance lock.
- Assuming retention unlocks on demand after lock.
- Confusing bucket default class with object class after lifecycle moves.
- Designing Org Policy / Shared VPC answers on a storage-class stem (leave 08-08 on its shelf).
§VI — Closing
Name the shelf before you pick the product feature. Ops and Dev inventory the live fields; this seat grades the choice.
Related
- Ops — Python GCS lifecycle census
- Dev — Python bucket policy inventory
- Go — BucketAttrs inventory