I've been searching through similar questions but none of them was quite answered.
I have 2 GCP Projects, Project A is running one environment and has connected Bitbucket, which is cloned into Source Repository. Then I want to run Cloud Build from project B with a repository from project A.
First of all, I gave Source Repository Administrator permission to project-B@cloudbuild.gserviceaccount.com on project A.
This still doesn't allow me to create triggers because I can't list connected repositories on project B, even though it has permissions. However, I successfully created these triggers via Terraform where I followed the basic approach of creating triggers and defined trigger_teplate like this:
trigger_template {
project_id = "ProjectA"
branch_name = "dev"
repo_name = "bitbucket_org_reponame"
}
After applying the terraform, it created the trigger and I was able to run it manually and it worked, however, it still shows that repositories are not connected. This means that the trigger can't run automatically and for manual invocation, I always have to write down the branch which I want to use.
This is quite inconvenient for me, did I miss something? Some permissions that I need to add, is it still impossible even when this works partially?