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?
- gcloud storage buckets create gs://audit-compliance-logs-2026 --location=europe-west1 --uniform-bucket-level-access --enable-object-versioningAnswer
- Bgsutil mb -l europe-west1 -b on gs://audit-compliance-logs-2026 && gsutil versioning set on gs://audit-compliance-logs-2026
- Cgcloud storage buckets create gs://audit-compliance-logs-2026 --location=europe-west1 --no-uniform-bucket-level-access --enable-object-versioning
- Dgcloud storage buckets create gs://audit-compliance-logs-2026 --location=europe-west1 --default-storage-class=ARCHIVE --enable-object-versioning
Answer
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.
Step-by-Step Solution
Key Concept
Deploying Cloud Storage Buckets with gcloud storage