Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Build Error - Permission 'cloudbuild.builds.create' denied

I have set up a trigger in Cloud Build which uses a custom service account (say gcb-service-account). gcb-service-account is given "Cloud Build Service Account" role in IAM. I logged in to console using browser using my own user id having role of "Owner". When I trigger the build, it gives below error.

Failed to trigger build: Permission 'cloudbuild.builds.create' denied on resource 'projects/000000fab282f8ed' (or it may not exist)

When I looked at the logs using Duet AI, following is what it shows

  • It indicates that a user with the email address my user id attempted to create a build using the RunBuildTrigger method of the Cloud Build API.
  • The request was denied because the user did not have the required cloudbuild.builds.create permission on the project 000000fab555f6ed .
 
Given my user id has Owner role and service account id has "Cloud Build Service Account", I didn't expect this error. Can you please help?
0 6 3,022
6 REPLIES 6