Question

Difficulty: EasyDeploying and Configuring Cloud Storage Buckets and Objects

You are tasked with deploying a new Google Cloud Storage bucket named `analytics-data-dump` in the `us-central1` region using the modern Google Cloud CLI (`gcloud`). Which command should you run to create this bucket following Google Cloud best practices?

  1. gcloud storage buckets create gs://analytics-data-dump --location=us-central1Answer
  2. B
    gcloud storage buckets make gs://analytics-data-dump --region=us-central1
  3. C
    gsutil mb -l us-central1 bucket://analytics-data-dump
  4. D
    gcloud compute buckets create analytics-data-dump --zone=us-central1-a

Answer

The command `gcloud storage buckets create gs://analytics-data-dump --location=us-central1` correctly deploys a Cloud Storage bucket using the unified Google Cloud CLI.
The correct command uses `gcloud storage buckets create` along with the standard `gs://` prefix and the `--location` flag to specify the target GCP region (`us-central1`). This aligns with current Google Cloud CLI best practices.

Step-by-Step Solution

1
Identify the recommended CLI interface for Cloud Storage management.
`gcloud storage` is the modern standard CLI tool replacing legacy `gsutil` commands.
Google Cloud recommends `gcloud storage` for improved performance and unified command structure.
2
Select the correct subcommand for bucket creation.
Use `gcloud storage buckets create`.
The `buckets create` surface is the standard verb pattern in `gcloud`.
3
Specify the bucket URI prefix and location flag.
Pass `gs://<bucket-name>` and `--location=<region>`.
Cloud Storage buckets require the `gs://` protocol scheme and regional/multi-regional locations specified via `--location`.

Key Concept

Deploying Cloud Storage buckets using modern gcloud storage commands
Rate this question