Question

Difficulty: MediumDeploying and Configuring Cloud Storage Buckets and Objects

A cloud engineer is deploying a new Google Cloud Storage bucket named `gs://finance-reports-archival` to store sensitive audit documents. The requirements mandate creating the bucket in the `us-central1` region, enforcing uniform bucket-level access to prevent object-level ACL overrides, applying a lifecycle management configuration from a local file named `policy.json` to transition items to Coldline storage, and finally populating the bucket with local files from `./reports/`. What is the correct sequential order of `gcloud storage` administrative steps to complete this deployment?

  1. 1Provision the new Cloud Storage bucket in the designated region using `gcloud storage buckets create gs://finance-reports-archival --location=us-central1`.
  2. 2Enforce uniform bucket-level access on the newly provisioned bucket using `gcloud storage buckets update gs://finance-reports-archival --uniform-bucket-level-access`.
  3. 3Apply the lifecycle management rule from the configuration file using `gcloud storage buckets update gs://finance-reports-archival --lifecycle-file=policy.json`.
  4. 4Upload the local document directory to the bucket using `gcloud storage cp -r ./reports/ gs://finance-reports-archival/`.

Answer

The correct operational sequence begins with provisioning the bucket resource, configuring security controls (uniform bucket-level access), applying lifecycle rules from the configuration file, and finally copying local object files into the bucket.
The correct deployment sequence follows standard infrastructure lifecycle practices: provision the storage container (`gcloud storage buckets create`), apply security controls (`--uniform-bucket-level-access`), configure management rules (`--lifecycle-file`), and then perform data ingestion (`gcloud storage cp`).

Step-by-Step Solution

1
Provision the bucket
Bucket `gs://finance-reports-archival` is created in `us-central1`.
You cannot update configuration settings or upload data to a bucket that does not yet exist.
2
Configure security controls
Uniform bucket-level access is enabled, disabling legacy object ACLs.
Configuring security boundaries prior to data ingestion ensures objects uploaded later strictly inherit IAM access policies.
3
Apply object lifecycle management
The bucket updates its lifecycle metadata using `policy.json`.
Applying the lifecycle rule prior to data upload guarantees that incoming objects are managed by the storage class transition rules immediately upon upload.
4
Ingest objects into the bucket
Local report files are copied to `gs://finance-reports-archival/`.
Data transfer occurs as the final step after target storage resources and policies are fully initialized.

Key Concept

Cloud Storage Deployment Lifecycle & Ordering
Rate this question