A media streaming company is setting up a new web asset repository on Google Cloud to host image and stylesheet files in the us-central1 region. The cloud architecture team mandates using Google Cloud's modern CLI tools (gcloud storage) and enforcing Uniform Bucket-Level Access to ensure consistent IAM governance across all stored objects. Which set of commands correctly provisions the bucket and uploads the static files according to Google Cloud best practices?
- Execute gcloud storage buckets create gs://media-app-assets-2026 --location=us-central1 --uniform-bucket-level-access to provision the bucket, then execute gcloud storage cp -r ./assets/* gs://media-app-assets-2026/ to upload the static files.Cevap
- BExecute gsutil mb -l us-central1 --enable-ubla gs://media-app-assets-2026 to provision the bucket, then execute gsutil cp -r ./assets/* gs://media-app-assets-2026/ to upload the static files.
- CExecute gcloud storage buckets create gs://media-app-assets-2026 --location=us-central1 to create the bucket, then execute gsutil acl ch -u AllUsers:R gs://media-app-assets-2026/* to set object permissions.
- DExecute gcloud storage buckets create gs://media-app-assets-2026 --location=us-central1 to create the bucket, then grant the primitive Owner role (roles/owner) to asset consumers to manage bucket contents.
Cevap
Execute gcloud storage buckets create gs://media-app-assets-2026 --location=us-central1 --uniform-bucket-level-access to provision the bucket, then execute gcloud storage cp -r ./assets/* gs://media-app-assets-2026/ to upload the static files.
The correct response specifies using `gcloud storage buckets create` with `--location=us-central1` and `--uniform-bucket-level-access`, followed by `gcloud storage cp` to upload files. This follows Google Cloud's current best practices for bucket deployment and CLI usage.
Adım Adım Çözüm
Anahtar Kavram
Deploying Cloud Storage Buckets with Uniform Bucket-Level Access using gcloud storage CLI