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?
- gcloud iam service-accounts create data-processor --display-name="Data Processing Service Account" --project=analytics-prodCevap
- Bgcloud iam service-accounts keys create data-processor-key.json --iam-account=data-processor@analytics-prod.iam.gserviceaccount.com
- Cgcloud projects add-iam-policy-binding analytics-prod --member="serviceAccount:[email protected]" --role="roles/editor"
- Dgcloud 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
Anahtar Kavram
Creating User-Managed Service Accounts with gcloud CLI