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

Failed to Create Secrets when Connect Cloud Build Connection to Bitbucket Cloud

Hi, I'm currently have automation deployment using cloud build (gen 1), the source code we store to bitbucket cloud and using cloud source repository for mirroring, I'm seeing the cloud source repository scheduled to end of sale this month, and also by another reason I try to migration to use cloud build (gen 2) with different connection method to bitbucket cloud here is the documentation https://cloud.google.com/build/docs/automating-builds/bitbucket/connect-host-bitbucket-cloud

My current conditions : 

  1. Enabled API cloud build, secret manager, dockerfile already on the repository ✔️
  2. My account has permission/IAM policy as an admin role to cloud build, cloud build repository, cloud build connection, secret manager ✔️
  3. two Access tokens for Admin and Read already created on repository. I'm still use bitbucket standard package, which is only has a feature to create access token on repository level ✔️

I tried to create new connection host and I got this alert pop message "Failed to write secrets to Secret Manager",

Screenshot 2024-06-10 at 13.27.25 copy.png

  but when I check to Secret Manager page, there are three key created by cloud build.

Screenshot 2024-06-11 at 13.18.43.png

did I miss something?

0 2 664
2 REPLIES 2

There were 2 cancelled requests & 3 successed requests when create the secret key. I don't understand why those request were cancelled. I'm using chrome browser and no extention activate for blocked request or something to prevent the xhr request. Also I have sent multiple feedback on GCP console, I'm not receive yet response from GCP since last week.

Screenshot 2024-06-18 at 16.53.26.png

Solved, just inform that my IAM account was non-admin to Secret Manager (only create & delete role), just upgrade to Admin role to Secret Manager and host successfully created. And Also don't forget to enable Secret Manager on SA Cloud Build.

Thanks