Soru

Zorluk: OrtaDeploying and Configuring Cloud Storage Buckets and Objects

A DevOps team is deploying a new Google Cloud Storage bucket named `media-ingest-prod-2026` in the `us-central1` region to process incoming video uploads. According to organizational compliance guidelines and Google Cloud best practices, the bucket must enforce uniform access control via IAM policies instead of legacy per-object ACLs, and object versioning must be enabled at creation time. Which `gcloud` command should the team execute to create the bucket with these requirements?

  1. `gcloud storage buckets create gs://media-ingest-prod-2026 --location=us-central1 --uniform-bucket-level-access --enable-object-versioning`Cevap
  2. B
    `gsutil mb -l us-central1 -b on gs://media-ingest-prod-2026`
  3. C
    `gcloud storage buckets create gs://media-ingest-prod-2026 --location=us-central1 --no-uniform-bucket-level-access --enable-object-versioning`
  4. D
    `gcloud storage buckets update gs://media-ingest-prod-2026 --location=us-central1 --uniform-bucket-level-access`

Cevap

Execute `gcloud storage buckets create gs://media-ingest-prod-2026 --location=us-central1 --uniform-bucket-level-access --enable-object-versioning` to deploy the bucket with uniform access and versioning enabled.
The correct command uses `gcloud storage buckets create` to provision the bucket and applies `--uniform-bucket-level-access` alongside `--enable-object-versioning` in a single operational step.

Adım Adım Çözüm

1
Identify the primary tool for deployment
Google Cloud recommends using `gcloud storage` CLI commands over legacy `gsutil` for bucket operations.
Modern gcloud storage commands offer improved performance and standardized syntax across GCP tools.
2
Determine the required flags for security and versioning
Pass `--uniform-bucket-level-access` to enforce IAM-only access and `--enable-object-versioning` to preserve object states.
Uniform bucket-level access disables legacy object ACLs, aligning with security best practices.
3
Construct the bucket creation command
Combine the bucket URI `gs://media-ingest-prod-2026`, `--location=us-central1`, and the two required configuration flags.
This single gcloud command provisions the bucket with all mandatory parameters at initial creation.

Anahtar Kavram

Deploying Cloud Storage Buckets with Uniform Access and Versioning via gcloud CLI
Bu soruyu puanla