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?
- gcloud iam service-accounts create analytics-worker --display-name="Analytics Worker"Answer
- Bgcloud iam service-accounts keys create analytics-worker.json --iam-account=analytics-worker
- Cgcloud projects add-iam-policy-binding my-project --member="user:analytics-worker" --role="roles/owner"
- Dgcloud services enable serviceaccounts.googleapis.com --project=analytics-worker
Answer
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.
Step-by-Step Solution
Key Concept
Creating User-Managed Service Accounts via gcloud CLI