Soru

Zorluk: ZorManaging Cloud Projects and Resource Hierarchy

A Cloud Engineer is tasked with setting up a new production workload environment in Google Cloud. The workload requires creating a new project named `analytics-prod-99` inside an existing folder named `Production` (Folder ID: `987654321`), linking it to the organization's Cloud Billing Account (ID: `01A2B3-4C5D6E-7F8901`), enabling the Compute Engine API, and assigning the predefined Compute Admin role (`roles/compute.admin`) to the Operations group (`[email protected]`). Arrange the `gcloud` CLI commands in the correct logical order required to execute this end-to-end configuration.

  1. 1Run `gcloud projects create analytics-prod-99 --folder=987654321` to establish the resource within the folder hierarchy.
  2. 2Run `gcloud billing projects link analytics-prod-99 --billing-account=01A2B3-4C5D6E-7F8901` to attach payment backing.
  3. 3Run `gcloud services enable compute.googleapis.com --project=analytics-prod-99` to activate the target service API.
  4. 4Run `gcloud projects add-iam-policy-binding analytics-prod-99 --member="group:[email protected]" --role="roles/compute.admin"` to grant resource privileges.

Cevap

The correct procedural order is: 1) Create the project inside the target folder, 2) Link the project to the billing account, 3) Enable the Compute Engine API on the project, and 4) Grant the predefined Compute Admin IAM role to the operations group.
The proper administrative sequence mandates creating the resource hierarchy node first (`gcloud projects create --folder`), establishing billing association (`gcloud billing projects link`), activating required API endpoints (`gcloud services enable`), and finally applying scoped predefined IAM roles (`gcloud projects add-iam-policy-binding`).

Adım Adım Çözüm

1
Provision the project under the resource hierarchy
Project `analytics-prod-99` is created directly beneath Folder ID `987654321`.
Google Cloud resources must be instantiated in the hierarchy before target-specific project configurations can be performed.
2
Link the billing account to the newly created project
Billing account `01A2B3-4C5D6E-7F8901` is linked to `analytics-prod-99`.
Google Cloud service APIs (like Compute Engine) require an associated billing account to consume paid cloud resources.
3
Enable required API services for the project
The `compute.googleapis.com` API service is enabled for `analytics-prod-99`.
Services must be explicitly enabled on a billed project before their corresponding APIs and infrastructure resources become manageable.
4
Apply IAM policy bindings for administrative access
The `[email protected]` group receives the `roles/compute.admin` role on `analytics-prod-99`.
Granting predefined roles adhering to least privilege follows service enabling so users can manage the enabled compute resources.

Anahtar Kavram

GCP Project Provisioning and Hierarchy Setup Sequence
Bu soruyu puanla