Ali
Ali

Reputation: 19

google firebase is giving me secret manger error and I can't use "firebase init"

I'm trying to host my web on fire base and following the tutorial I'm getting a secret manger error that looks like this

Error: could not assert Secret Manager permissions. Make sure that Secret Manager is enabled in your GCP project and that the Cloud Build P4SA ([email protected]) has permissions secretmanager.secrets.create and secretmanager.secrets.setIamPolicy. Error: generic::permission_denied: Permission 'secretmanager.secrets.create' denied for resource 'projects/edrak-fc40c' (or it may not exist).

I tried following the google tutorial but I get this error every time and I gave the secret manger accessor role to my project in IAM so I don't know where I'm going wrong

Upvotes: 1

Views: 268

Answers (1)

Almund
Almund

Reputation: 6226

I think your cloudbuild service account has to have the secretmanager.secrets.setIamPolicy policy in order to be able to create the required secrets. The secret manager accessor role is only for accessing the secrets and that should be on the compute account.

Upvotes: 0

Related Questions