Question

Difficulty: HardDeploying and Configuring Cloud Storage Buckets and Objects

A firmware distribution engineering team needs to provision a new public Cloud Storage bucket in a dual-region, enforce uniform security permissions, grant anonymous public read access, and attach an object lifecycle policy using the gcloud CLI. What is the correct sequence of steps to configure this storage solution?

  1. 1Provision the dual-region bucket by running 'gcloud storage buckets create gs://firmware-dist-2026 --location=nam4 --default-storage-class=STANDARD'.
  2. 2Enforce uniform bucket permissions by running 'gcloud storage buckets update gs://firmware-dist-2026 --uniform-bucket-level-access'.
  3. 3Grant public object read access by executing 'gcloud storage buckets add-iam-policy-binding gs://firmware-dist-2026 --member=allUsers --role=roles/storage.objectViewer'.
  4. 4Attach the lifecycle rule configuration by running 'gcloud storage buckets update gs://firmware-dist-2026 --lifecycle-file=policy.json'.

Answer

The correct sequence is: First, create the bucket using gcloud storage buckets create; second, enable Uniform Bucket-Level Access; third, bind the roles/storage.objectViewer IAM role to allUsers; fourth, apply the lifecycle configuration file.
The deployment sequence follows logical GCP operational lifecycle order: provisioning the container resource (gcloud storage buckets create), setting security boundaries (enabling Uniform Bucket-Level Access), defining identity access controls (granting roles/storage.objectViewer to allUsers), and finally applying automated lifecycle rules (updating bucket with --lifecycle-file).

Step-by-Step Solution

1
Provision the initial Cloud Storage bucket resource.
Bucket gs://firmware-dist-2026 is created in the nam4 dual-region location.
Subsequent configuration commands require an existing bucket target.
2
Configure bucket security controls.
Uniform Bucket-Level Access is enabled on the bucket.
Best practice requires enforcing uniform access control before assigning bucket-level IAM roles.
3
Apply IAM access controls.
allUsers identity is assigned roles/storage.objectViewer on the bucket.
Allows public read access to firmware binaries stored inside the bucket.
4
Apply object lifecycle management.
Lifecycle rules defined in policy.json are active on the bucket.
Automates long-term object state transitions once the bucket operational profile is established.

Key Concept

Sequential provisioning and configuration of Cloud Storage buckets using modern gcloud storage CLI tooling.
Estimated Time:2m 0s
Rate this question