Hi,
I found that the service account permission setting in Cloud Build is working as a personal setting, not a shared setting across all organisation users in the same project. Is there any possible way to set up a custom service account to a default service account for Cloud Build Trigger rather than setting the preferred service account by each user?
I appreciate your time. Thank you.
From user 1
From user 2
Hello @user19283045 ,Welcome on Google Cloud Community.
You could create SA under shared project ( or any kind of project ). Then assign permissions on folder or organization level. At the end, you will be able to specify service account.
1. I've created SA community-sa-cloud-build@XXXXX on project webapp.
2. I've assigned this SA at the PROD folder level, where I have few projects ( typical Organization structure). I've assigned Cloud Build Service Agent. So, each project under mentioned folder will inherit predefined role.
3. Then, I've created Cloud Build Trigger and was able to use following SA. BUt what I had to do, was click on "SWITCH PROJECT" and pick project where my SA was created. Of course you have to assign proper permissions like Folder viewer or Project Viewer and so on, but basically you should be able to create one-shared SA for all Cloud Builds.
--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost
Hello, User, this is the answer that has worked for me in the past:
ou can create a Service Account (SA) under a shared project or any other type of project. After that, assign permissions at the folder or organization level. Eventually, you'll be able to specify the service account.