0

My app uses Cloud Run, Cloud Build, Cloud SQL, Cloud Secrets. Everything worked fine till october 28 - at that day I took some time off from my project. When I returned and tried to deploy new version of my app on 6 november I started to have big problem. I can't deploy any revision of app while using secrets from secret manager. Simply when trying to do that, deploy button does not work. It is not disabled and there are no error messages but nothing happens. When I delete secrets from revision everything works and app is deployed. I tried to create new secrets, update permissions for accounts and create new accounts with proper permissions but nothing worked when I am trying to use secrets.

Steps to reproduce:

  1. Go to cloud run and create new service
  2. Choose name and image
  3. Then in advanced settings choose 'variables and secrets'
  4. Reference a secret - does not matter if it is environmental variable or volume

I found very similar problem with solution that I tried: https://stackoverflow.com/a/69860213/15016374 however I got weird errors associated with currently used secrets.

kurowskiandrzej
  • 1
  • 1
  • 1
  • 1

1 Answers1

0

I finally got somewhere. I created new Service without any secrets. Then through cloud shell command I introduced the secrets. Updating current revision didn't worked. Here is command if you need it:

gcloud beta run deploy [name of service] \
--image=[name of image you want to use] \
--platform=managed \
--region=europe-central2 \
--project=[name of your project] \
--update-secrets=[write your secrets with comma as separator] \
--service-account=[service account name]
kurowskiandrzej
  • 1
  • 1
  • 1
  • 1