https://prefect.io logo
#prefect-community
Title
# prefect-community
f

flurven

07/11/2022, 8:34 PM
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

alex

07/11/2022, 8:39 PM
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

Andrew Huang

07/11/2022, 8:40 PM
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

flurven

07/11/2022, 8:51 PM
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

alex

07/11/2022, 8:54 PM
I believe Storage Object Admin gives you full access to objects in GCS buckets
f

flurven

07/11/2022, 9:26 PM
Had to add storage.buckets.get as well. Weird. But now it works! Thanks.
5 Views