Getting error when importing library prefect_gcp. ...
# ask-community
f
Getting error when importing library prefect_gcp. On prefect 2.0. NameError: name 'SecretManagerServiceClient' is not defined.
I copied the example code from github.
a
Hi @flurven! In order to use the Secret Manager tasks in
prefect-gcp
, you need to install with the
secret_manager
extra (e.g.
pip install "prefect-gcp[secret_manager]"
).
👍 1
a
Yeah I think we may need to release a new version of prefect-gcp that fixes this (or at least provides more insightful error messages).
👍 1
f
Now it works. But the service account doesn't seem to have access to cloud storage bucket. Do you know what role to use? I even tried storage admin.
a
I believe Storage Object Admin gives you full access to objects in GCS buckets
f
Had to add storage.buckets.get as well. Weird. But now it works! Thanks.