Question

Difficulty: HardDeploying and Configuring Cloud Storage Buckets and Objects

A video streaming platform is implementing an automated ingest workflow in Google Cloud. A DevOps engineer needs to create a new Cloud Storage bucket named `media-raw-uploads-2026` in the `us-central1` region using modern `gcloud storage` CLI tools. The bucket design mandates two strict compliance and operational rules: all access permissions must be managed strictly at the bucket level rather than per-object ACLs, and all uploaded raw video files must automatically transition to Coldline storage 30 days after creation to manage storage expenditure. The lifecycle configuration policy has already been saved locally in a file named `lifecycle.json`. Which TWO commands should the engineer run to provision this bucket according to Google-recommended best practices?

  1. gcloud storage buckets create gs://media-raw-uploads-2026 --location=us-central1 --uniform-bucket-level-accessAnswer
  2. gcloud storage buckets update gs://media-raw-uploads-2026 --lifecycle-file=lifecycle.jsonAnswer
  3. C
    gsutil lifecycle set lifecycle.json gs://media-raw-uploads-2026
  4. D
    gcloud storage buckets create gs://media-raw-uploads-2026 --location=us-central1 --default-storage-class=COLDLINE

Answer

The correct commands are executing 'gcloud storage buckets create gs://media-raw-uploads-2026 --location=us-central1 --uniform-bucket-level-access' to deploy the bucket with uniform access controls, and running 'gcloud storage buckets update gs://media-raw-uploads-2026 --lifecycle-file=lifecycle.json' to apply the 30-day storage class transition lifecycle policy.
To fulfill the requirements using Google-recommended practices, the bucket must be created using modern 'gcloud storage' CLI tools with the '--uniform-bucket-level-access' flag to ensure IAM handles access at the bucket level. To automate the 30-day transition to Coldline without penalizing immediate ingest access, the lifecycle policy file must be attached via 'gcloud storage buckets update --lifecycle-file=lifecycle.json'.

Step-by-Step Solution

1
Provision the bucket using modern gcloud storage CLI with required location and uniform bucket-level access enabled.
Bucket gs://media-raw-uploads-2026 is created with Uniform Bucket-Level Access enforced, disabling individual object ACLs.
Uniform Bucket-Level Access fulfills the requirement of managing permissions strictly at the bucket level via IAM.
2
Apply the object lifecycle management configuration to the bucket using the gcloud storage update command.
The bucket receives the lifecycle policy defined in lifecycle.json.
Objects uploaded to the bucket will automatically transition to Coldline storage after 30 days without changing the bucket's default storage class.

Key Concept

Deploying Cloud Storage buckets and configuring lifecycle policies using the modern gcloud storage CLI.
Rate this question