Soru

Zorluk: KolayCreating and Managing Service Accounts

You are configuring access control for a background application running in Google Cloud. You need to create a new user-managed service account named `analytics-worker` using the `gcloud` CLI. Which command should you execute to create this service account?

  1. gcloud iam service-accounts create analytics-worker --display-name="Analytics Worker"Cevap
  2. B
    gcloud iam service-accounts keys create analytics-worker.json --iam-account=analytics-worker
  3. C
    gcloud projects add-iam-policy-binding my-project --member="user:analytics-worker" --role="roles/owner"
  4. D
    gcloud services enable serviceaccounts.googleapis.com --project=analytics-worker

Cevap

The command `gcloud iam service-accounts create analytics-worker --display-name="Analytics Worker"` correctly provisions a user-managed service account.
The correct answer uses `gcloud iam service-accounts create analytics-worker --display-name="Analytics Worker"`, which is the standard Google Cloud SDK command for provisioning a new user-managed service account.

Adım Adım Çözüm

1
Identify the required administrative operation
Creating a new identity (service account) within Google Cloud IAM.
The requirement asks specifically to create a user-managed service account named analytics-worker.
2
Select the proper gcloud CLI group and command
Use `gcloud iam service-accounts create`.
Service account management commands reside under the `gcloud iam service-accounts` command group.

Anahtar Kavram

Creating User-Managed Service Accounts via gcloud CLI
Bu soruyu puanla