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
What is the email format of the Compute Engine default service account?
- PROJECT_NUMBER-compute@developer.gserviceaccount.com
- PROJECT_ID@appspot.gserviceaccount.com
- compute-default@PROJECT_ID.iam.gserviceaccount.com
- 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.
Which statements describe Google-managed service agents?
- Google Cloud creates and manages them
- They appear in your project's service account list
- A service uses them to act on your resources on its behalf
- You create them with gcloud iam service-accounts create
- 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.
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.
