A financial analytics firm is deploying a Cloud Storage bucket named `fin-reports-eu-2026` in the `europe-west3` region to store monthly transaction summaries. Security policies require that all object access be managed strictly through Google Cloud IAM permissions rather than per-object Access Control Lists (ACLs). Additionally, to optimize long-term storage costs, transaction reports older than 30 days must automatically transition to Nearline storage. Which TWO actions using modern `gcloud storage` commands should the cloud engineer perform to meet these requirements?
- Run `gcloud storage buckets update gs://fin-reports-eu-2026 --enable-uniform-bucket-level-access` to enforce unified IAM permissions across all objects.Cevap
- Define a lifecycle configuration JSON file specifying an `age` condition of 30 days with a `SetStorageClass` action set to `NEARLINE`, and execute `gcloud storage buckets update gs://fin-reports-eu-2026 --lifecycle-file=lifecycle.json`.Cevap
- CRun `gsutil acl ch -u AllUsers:R gs://fin-reports-eu-2026` to convert existing ACLs into inherited IAM permissions.
- DExecute `gcloud storage objects update gs://fin-reports-eu-2026/* --storage-class=NEARLINE --age=30d` to update object classes retroactively.
Cevap
The correct configuration requires running `gcloud storage buckets update gs://fin-reports-eu-2026 --enable-uniform-bucket-level-access` to enforce IAM access control and applying a lifecycle policy JSON file using `gcloud storage buckets update gs://fin-reports-eu-2026 --lifecycle-file=lifecycle.json` to transition objects to Nearline storage after 30 days.
To satisfy security requirements restricting access management solely to IAM, Uniform Bucket-Level Access must be enabled using the `gcloud storage buckets update` command with the `--enable-uniform-bucket-level-access` flag. To automate storage class migration based on object age, a bucket lifecycle rule JSON file must be defined and bound to the bucket using `--lifecycle-file`.
Adım Adım Çözüm
Anahtar Kavram
Configuring Cloud Storage access governance with Uniform Bucket-Level Access and automated tiering via bucket lifecycle management in `gcloud storage`.