Secret manager access denied despite correct roles for service account
I'm writing a cloud function in Nodejs (10), and trying to access a secret like so: const [secret] = await new SecretManagerServiceClient().accessSecretVersion({ name: `projects/PROJECT_NUMBER/secrets/SECRET_NAME/versions/latest` }) I created the secret in the web console and the name used in code matches that of the existing secret. On the page for the clou