Bitzu

Associate Cloud Engineer ยท Service accounts fundamentals

Types of service accounts

User-managed, default and Google-managed service agents, naming, gcloud iam service-accounts create, disabling default service accounts.

Key points

  • User-managed: you create them (gcloud iam service-accounts create NAME), email NAME@PROJECT_ID.iam.gserviceaccount.com.
  • Default: user-managed accounts Google creates when a service is used (Compute Engine, App Engine); you manage them afterwards.
  • Google-managed service agents: owned by Google, used by services to act on your resources, not listed in your project's service accounts.

Source: https://docs.cloud.google.com/iam/docs/service-account-types

Practice questions

Single choice

What is the email format of the Compute Engine default service account?

  1. PROJECT_NUMBER-compute@developer.gserviceaccount.com
  2. PROJECT_ID@appspot.gserviceaccount.com
  3. compute-default@PROJECT_ID.iam.gserviceaccount.com
  4. PROJECT_NUMBER@cloudservices.gserviceaccount.com
Show answer

Answer: A. PROJECT_NUMBER-compute@developer.gserviceaccount.com

It is built from the project number, not the project ID. The PROJECT_ID@appspot form belongs to App Engine.

Select all that apply

Which statements describe Google-managed service agents?

  1. Google Cloud creates and manages them
  2. They appear in your project's service account list
  3. A service uses them to act on your resources on its behalf
  4. You create them with gcloud iam service-accounts create
  5. They always hold the Owner role on the project
Show answer

Answer: A. Google Cloud creates and manages them, C. A service uses them to act on your resources on its behalf

Service agents are owned by Google and let a service act on your resources. They are not created by you with gcloud and do not show up in your project's service account list.

True or false

A service account you create with gcloud iam service-accounts create automatically receives the Editor role on the project.

Show answer

Answer: False

False. A new user-managed account has no project roles until you grant them. Only some default accounts may get Editor automatically, depending on org policy.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More Associate Cloud Engineer topics in this module