numbsafari
numbsafari

Reputation: 370

What is the difference between the Cloud Build Service Account and Service Agent?

When you enable the Google Cloud Build service for a project, two service accounts are assigned roles within the project:

Unfortunately, for this latter service account, I can find no documentation. I'm assuming this is the account that actually triggers builds, whereas the other one is used by the running builds themselves.

Is that accurate?

Upvotes: 8

Views: 7564

Answers (2)

marian.vladoi
marian.vladoi

Reputation: 8074

According to official documentation Understanding roles:

Cloud Build Service Account can perform builds

Cloud Build Service Agent (Alpha) gives Cloud Build service Account access to managed resources

Upvotes: 1

John Hanley
John Hanley

Reputation: 81454

Any service that has "Agent" in the service account description should be left alone. These service accounts are used by the service for authorization to Google Cloud services that it requires to operate. These service accounts are owned/managed/controlled by Google Cloud. If you remove permissions from this service account, the service usually breaks (stops working correctly).

The Cloud Build Service Agent has permissions to manage/create resources in Google Cloud in your project that it needs to operate. This link provides documentation for these permissions.

Upvotes: 3

Related Questions