Soru

Zorluk: OrtaDeploying and Configuring Cloud Storage Buckets and Objects

A compliance team at a financial company requires a new Google Cloud Storage bucket to store daily transaction records in the europe-west1 region. The bucket must enforce Uniform Bucket-Level Access for consistent IAM access management and have object versioning enabled to prevent accidental overwrites. Which command should you execute to deploy the bucket according to Google-recommended best practices?

  1. gcloud storage buckets create gs://audit-compliance-logs-2026 --location=europe-west1 --uniform-bucket-level-access --enable-object-versioningCevap
  2. B
    gsutil mb -l europe-west1 -b on gs://audit-compliance-logs-2026 && gsutil versioning set on gs://audit-compliance-logs-2026
  3. C
    gcloud storage buckets create gs://audit-compliance-logs-2026 --location=europe-west1 --no-uniform-bucket-level-access --enable-object-versioning
  4. D
    gcloud storage buckets create gs://audit-compliance-logs-2026 --location=europe-west1 --default-storage-class=ARCHIVE --enable-object-versioning

Cevap

The command using 'gcloud storage buckets create' with both '--uniform-bucket-level-access' and '--enable-object-versioning' flags.
The correct option utilizes the modern 'gcloud storage buckets create' command surface with the '--uniform-bucket-level-access' flag to enforce uniform IAM permissions and '--enable-object-versioning' to maintain object version history, satisfying all security and operational requirements.

Adım Adım Çözüm

1
Identify the required CLI tool
Google Cloud recommends using the unified 'gcloud storage' tool over the legacy 'gsutil' tool for bucket management tasks.
gcloud storage offers faster performance and aligns with current GCP best practices.
2
Specify security and versioning requirements
Pass '--uniform-bucket-level-access' to disable per-object ACLs and '--enable-object-versioning' to protect objects against accidental deletion.
These flags fulfill both compliance mandates directly upon bucket creation.

Anahtar Kavram

Deploying Cloud Storage Buckets with gcloud storage
Bu soruyu puanla