Soru

Zorluk: OrtaCreating and Managing Service Accounts

A cloud engineer is configuring identity management for a new background processing workload in Google Cloud. The engineer needs to create a new user-managed service account named `data-processor` within the project `analytics-prod` using the Google Cloud CLI (`gcloud`). Which command should the engineer execute to correctly create this service account?

  1. gcloud iam service-accounts create data-processor --display-name="Data Processing Service Account" --project=analytics-prodCevap
  2. B
    gcloud iam service-accounts keys create data-processor-key.json --iam-account=data-processor@analytics-prod.iam.gserviceaccount.com
  3. C
    gcloud projects add-iam-policy-binding analytics-prod --member="serviceAccount:[email protected]" --role="roles/editor"
  4. D
    gcloud services enable iam.googleapis.com --project=analytics-dev-consumer

Cevap

The command `gcloud iam service-accounts create data-processor --display-name="Data Processing Service Account" --project=analytics-prod` correctly creates a user-managed service account in Google Cloud.
The command starting with `gcloud iam service-accounts create` accurately specifies the positional argument for the service account ID (`data-processor`) along with optional metadata flags (`--display-name`) and project target (`--project`). This creates the service account identity in the specified project.

Adım Adım Çözüm

1
Identify the target gcloud tool and component group for service account management.
The correct command group under gcloud is `gcloud iam service-accounts`.
Service account resource operations are located under the IAM service-accounts subcommand branch.
2
Select the correct action verb for creation.
The action verb to instantiate a new service account is `create`.
The `create` verb initializes a new service account identity within the target project.
3
Specify the service account ID and descriptive flags.
Provide `data-processor` as the positional argument along with `--display-name` and `--project` flags.
This sets the unique service account ID and descriptive metadata in the designated project.

Anahtar Kavram

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