Diagram
A four-step process flow showing how to create a user-managed service account, grant it IAM roles, authorize the deployer with roles/iam.serviceAccountUser, and attach the account to a VM with gcloud, followed by a note that access requires both IAM roles and access scopes.
Restricting Who Can Attach a Service Account
Assigning and using a service account follows an ordered flow:
gcloud iam service-accounts create.gcloud projects add-iam-policy-binding, which sets what APIs the workload can call.roles/iam.serviceAccountUser on the service account to the user who will attach it, which permits that user to act as the account.gcloud compute instances create with the --service-account flag set to the account email.Domain 3 of 7
24 practice questions
Practice this DomainLast updated