Question

Difficulty: MediumDeploying and Configuring Cloud Storage Buckets and Objects

A data engineering team needs to provision a new Cloud Storage bucket named `analytics-raw-events` in the `us-central1` region to ingest event streams. Company security policy mandates enforcing Uniform Bucket-Level Access upon bucket creation to prevent fine-grained object access control lists (ACLs) from bypassing IAM access policies. Which command should the team execute using the modern `gcloud` CLI to meet these requirements?

  1. gcloud storage buckets create gs://analytics-raw-events --location=us-central1 --uniform-bucket-level-accessAnswer
  2. B
    gsutil mb -l us-central1 -b on gs://analytics-raw-events
  3. C
    gcloud storage buckets create gs://analytics-raw-events --zone=us-central1-a --uniform-bucket-level-access
  4. D
    gcloud storage buckets create gs://analytics-raw-events --location=us-central1 followed by gcloud storage objects set-acl to grant read access on ingested files

Answer

Execute `gcloud storage buckets create gs://analytics-raw-events --location=us-central1 --uniform-bucket-level-access` to create the bucket with Uniform Bucket-Level Access enabled.
The command `gcloud storage buckets create gs://analytics-raw-events --location=us-central1 --uniform-bucket-level-access` correctly provisions the bucket using modern gcloud storage syntax while applying regional location settings and enabling Uniform Bucket-Level Access in a single step.

Step-by-Step Solution

1
Identify the primary CLI tool recommended by Google Cloud for managing Cloud Storage.
Use `gcloud storage` CLI commands rather than legacy `gsutil` syntax.
Google Cloud recommends `gcloud storage` for superior performance and unified command structure.
2
Specify the required bucket configuration flags.
Set `--location=us-central1` for region targeting and `--uniform-bucket-level-access` for security enforcement.
Cloud Storage buckets require a location specification and support enforcing uniform IAM-based permissions at creation time.

Key Concept

Cloud Storage Bucket Deployment and Access Enforcement via gcloud CLI
Estimated Time:1m 30s
Rate this question