We have added new secrets in our code and in cloudbuild.yaml mentioning same as other secrets
- ‘–update-secrets=secretname=projects/${_SECRET_PROJECT_NUMBER}/secrets/secretname:latest’
- ‘–region=${_LOCATION}’
It is trying to access secrets from the project where my cloud build and source repo is there not from
_SECRET_PROJECT_NUMBER and giving below error.
com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Permission ‘secretmanager.versions.access’ denied for resource ‘projects/cloudbuildproj/secrets/secretname/versions/latest’ (or it may not exist).
FYI Other secrets working fine