Soru

Zorluk: OrtaDeploying and Configuring Cloud Storage Buckets and Objects

A cloud engineer at a genomics research firm needs to set up a new Cloud Storage bucket in `us-east1` to store raw sequencing data. The deployment must enforce Uniform Bucket-Level Access, apply a 30-day object transition rule to Nearline storage defined in a local JSON file, and ingest the initial dataset. In what operational sequence should the engineer execute these tasks?

  1. 1Run `gcloud storage buckets create gs://genomics-sequencing-data-2026 --location=us-east1 --uniform-bucket-level-access` to provision the bucket.
  2. 2Create a local JSON file named `lifecycle.json` containing the rule to transition objects to Nearline storage after 30 days.
  3. 3Run `gcloud storage buckets update gs://genomics-sequencing-data-2026 --lifecycle-file=lifecycle.json` to attach the policy.
  4. 4Run `gcloud storage cp ./raw_data/* gs://genomics-sequencing-data-2026/` to upload the raw data files into the bucket.

Cevap

The correct operational sequence is: 1) Provision the bucket using `gcloud storage buckets create` with `--uniform-bucket-level-access`, 2) Create the local `lifecycle.json` policy file, 3) Apply the policy using `gcloud storage buckets update --lifecycle-file=lifecycle.json`, and 4) Upload the data files using `gcloud storage cp`.
The deployment workflow follows a strict dependency order: provision the Cloud Storage bucket with security constraints (Uniform Bucket-Level Access) first, author the local lifecycle policy JSON file second, attach the policy to the existing bucket third, and upload the data files fourth.

Adım Adım Çözüm

1
Provision the Cloud Storage bucket using `gcloud storage buckets create` with `--uniform-bucket-level-access`.
The target bucket `gs://genomics-sequencing-data-2026` is created in `us-east1` with uniform bucket-level access enabled.
A Cloud Storage bucket must exist before any configuration updates or object uploads can take place.
2
Draft the lifecycle rule definition in a local file named `lifecycle.json`.
A JSON configuration file containing the rule to transition objects to Nearline storage after 30 days is available locally.
The Google Cloud CLI requires a local file path to read the lifecycle policy JSON definition.
3
Apply the lifecycle policy to the bucket using `gcloud storage buckets update` with `--lifecycle-file`.
The lifecycle rule is attached and active on the target bucket.
Configuring lifecycle policies prior to data ingest ensures all newly uploaded objects are immediately governed by lifecycle rules.
4
Upload raw sequencing files to the bucket using `gcloud storage cp`.
Sequencing data files are safely transferred into the fully configured Cloud Storage bucket.
Objects should be uploaded only after the bucket parameters and lifecycle rules are active.

Anahtar Kavram

Deploying Cloud Storage buckets using modern gcloud storage CLI commands and configuring object lifecycle management policies.
Bu soruyu puanla