Question

Difficulty: MediumDeploying and Configuring Cloud Storage Buckets and Objects

A cloud engineer at a financial institution needs to deploy a new Cloud Storage bucket named `fin-reconciliation-vault` in the `us-east4` region. The bucket deployment must satisfy two key administrative requirements:
1. Prevent object-level Access Control Lists (ACLs) by enforcing Uniform Bucket-Level Access across all contained objects.
2. Protect records against accidental overwrites or deletions by enabling Object Versioning on the bucket.

Which of the following CLI commands should be executed to accomplish these deployment requirements? (Select TWO answers.)

  1. Run `gcloud storage buckets create gs://fin-reconciliation-vault --location=us-east4 --uniform-bucket-level-access`Answer
  2. Run `gcloud storage buckets update gs://fin-reconciliation-vault --versioning`Answer
  3. C
    Run `gsutil set-ubla on gs://fin-reconciliation-vault`
  4. D
    Apply individual per-object Access Control Lists (ACLs) to grant specific user read/write access after uploading records

Answer

Creating the bucket using `gcloud storage buckets create gs://fin-reconciliation-vault --location=us-east4 --uniform-bucket-level-access` and enabling object versioning using `gcloud storage buckets update gs://fin-reconciliation-vault --versioning`.
Executing `gcloud storage buckets create gs://fin-reconciliation-vault --location=us-east4 --uniform-bucket-level-access` provisions the bucket in the requested region while establishing uniform IAM permissions. Subsequently, running `gcloud storage buckets update gs://fin-reconciliation-vault --versioning` successfully enables Object Versioning to protect against file overwrites.

Step-by-Step Solution

1
Provision the Cloud Storage bucket with uniform access controls
Bucket is created in region `us-east4` with uniform bucket-level access enabled, disabling legacy per-object ACLs.
The `gcloud storage buckets create` command accepts the `--uniform-bucket-level-access` flag to enforce IAM-only access policies upon bucket creation.
2
Enable Object Versioning on the bucket
Object Versioning is activated for the target bucket.
Using `gcloud storage buckets update --versioning` ensures that historical versions of uploaded files are preserved against accidental deletion or modification.

Key Concept

Cloud Storage bucket deployment options and Object Versioning configuration using gcloud storage CLI
Rate this question