Question

Difficulty: EasyDeploying and Configuring Cloud Storage Buckets and Objects

A cloud engineer needs to set up a new Google Cloud Storage bucket for an analytics project, grant read permissions to a designated service account, and upload an initial data file. In what sequence should the engineer execute these operational steps?

  1. 1Create the Cloud Storage bucket using 'gcloud storage buckets create gs://analytics-data-2026 --location=us-central1'.
  2. 2Grant the Storage Object Viewer role to the service account using 'gcloud storage buckets add-iam-policy-binding gs://analytics-data-2026'.
  3. 3Upload the initial dataset file using 'gcloud storage cp sales_report.csv gs://analytics-data-2026/'.

Answer

The correct operational sequence is: first create the Cloud Storage bucket, next grant the IAM role to the service account, and finally upload the dataset file to the bucket.
Infrastructure provisioning follows a strict order of dependencies: create the bucket container first, configure access governance by applying IAM policy bindings second, and copy objects into the secured bucket last.

Step-by-Step Solution

1
Provision the destination bucket resource.
The Cloud Storage bucket gs://analytics-data-2026 is created in region us-central1.
A storage bucket must exist before any IAM policies can be attached to it or objects stored within it.
2
Attach the IAM policy binding to the bucket.
The service account is assigned the roles/storage.objectViewer role on the bucket.
Configuring access controls prior to populating objects ensures that authorized applications can read data immediately upon upload.
3
Copy the data file to the bucket.
The object sales_report.csv is uploaded into gs://analytics-data-2026/.
Object ingestion is executed once the destination container and permissions are fully established.

Key Concept

Deployment lifecycle sequence for provisioning Cloud Storage buckets, securing them with IAM roles, and uploading objects.
Estimated Time:1m 0s
Rate this question