Cloud Build trigger creation failed.

Hi Google Cloud Team,
I'm trying to deploy my repository from github to google run using cloud build.
Somehow, it throws error "Cloud Build trigger creation failed. Continuous Deployment pipeline is not set up. Error while setting necessary roles for Cloud Build Service Account. Required roles: roles/run.admin, roles/iam.serviceAccountUser."

I have setup Cloud Build Service Account to have the required roles as it suggest, still not working and throws the same error

Permlap_0-1710393830965.png

here is Cloud Build Service Agent

Permlap_1-1710393930490.png


Permlap_2-1710394019620.png

FYI, I accidently delete Compute Engine default service account for over 30 days.
This also might be the case as well.
I'm trying to recover my  Compute Engine default service account by trying this  https://stackoverflow.com/a/57360924 turn out it still not working because I deleted it for over 30 days

I also try to disable and re-enable Google Compute Engine API in my project still Compute Engine default service account not showing up

 

1 2 207
2 REPLIES 2

Hi @Permlap,

Welcome to Google Cloud Community!

Your Cloud Build trigger creation failed due to a permission issue with the Cloud Build service account. Here's how to fix it:

  1. Verify that the Cloud Build service account has the role roles/run.serviceAccountUser.

  2. If that doesn't work, create a new service account for Cloud Build, grant it the required role, and use it with your trigger.

  3. Recreate your Cloud Build trigger using the new service account (if you created one in step 2).

Hello @christianpaula, I have the same problem but after trying your solution, it still doesn't work.