Soru

Zorluk: ZorDeploying and Configuring Cloud Storage Buckets and Objects

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?

  1. Run `gcloud storage buckets update gs://fin-reports-eu-2026 --enable-uniform-bucket-level-access` to enforce unified IAM permissions across all objects.Cevap
  2. 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
  3. C
    Run `gsutil acl ch -u AllUsers:R gs://fin-reports-eu-2026` to convert existing ACLs into inherited IAM permissions.
  4. D
    Execute `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

1
Enforce uniform bucket-level access control on the storage bucket.
Disables individual object ACLs and forces permission evaluation through IAM roles.
Security governance mandates IAM-based access control rather than granular ACL grants per object.
2
Draft a lifecycle JSON policy with an age rule condition of 30 days and action type `SetStorageClass` with value `NEARLINE`.
Defines automated lifecycle management rules for object tiering.
Automating storage class migration minimizes manual operational overhead and reduces storage costs.
3
Execute `gcloud storage buckets update gs://fin-reports-eu-2026 --lifecycle-file=lifecycle.json`.
Applies the lifecycle policy configuration to the target Cloud Storage bucket using current Google Cloud CLI commands.
`gcloud storage` is the recommended CLI interface for bucket configuration and management in Google Cloud.

Anahtar Kavram

Configuring Cloud Storage access governance with Uniform Bucket-Level Access and automated tiering via bucket lifecycle management in `gcloud storage`.
Bu soruyu puanla