Importing to FHIR store from bucket

127 views
Skip to first unread message

Jwalant Vishvesh Bhatt

unread,
Jan 20, 2023, 10:43:55 AM1/20/23
to GCP Healthcare Discuss
Hello,

I'm trying to import data into my FHIR store from my bucket, which contains a FHIR resource. This error keeps coming up:
The Cloud Healthcare Service Agent service-pr...@gcp-sa-healthcare.iam.gserviceaccount.com is missing permissions associated with the following role(s): storage.objectViewer.

After looking at the documentation, I found out that I need to add a Role to the Cloud Healthcare service agent, since the Cloud Healthcare API does not have automatic access to other Google Cloud resources in your project. To do this, I went to IAM, checked the "Include Google-provided role grants", after which my service account was visible. I added the Storage Object Viewer role to the Principal.

I thought that should do it, but I keep getting the same error. Do I need to add permissions anywhere else as well? Something I found interesting was that I can only view the Cloud Healthcare Service Agent in the IAM tab in IAM & Admin. The Service Accounts tab in IAM & Admin is empty.

Thanks!

Screenshot (162).png

Truc Le

unread,
Jan 20, 2023, 10:52:16 AM1/20/23
to GCP Healthcare Discuss
Hello,

Is the bucket in the same project of the FHIR store?

Alternatively, you can try this command to grant IAM permission directly to just the bucket (please allow a few minutes for permission propagation):

gcloud iam add-iam-policy-binding service-accounts gs://BUCKET --member=service-PRO...@gcp-sa-healthcare.iam.gserviceaccount.com --role=roles/storage.objectViewer

Thanks,
Truc

Jwalant Vishvesh Bhatt

unread,
Jan 23, 2023, 8:05:12 AM1/23/23
to GCP Healthcare Discuss
Yes, the bucket is in the same project. I gave up on trying to do this using the Console and was following this guide: https://cloud.google.com/healthcare-api/docs/how-tos/fhir-resources
I have built a fhir store using the Google CLI, and am now trying to upload a dummy FHIR Patient resource into the fhirstore. Here's the error I got (in the attached img).

I have a feeling I'm missing a basic permission model. I followed the exact steps specified in the guide and this is the first error I encountered. Any pointers are appreciated!
Screenshot-errorgcp.png

Truc Le

unread,
Jan 23, 2023, 10:33:37 AM1/23/23
to GCP Healthcare Discuss
The guide you were following is to create resource via CRUD methods. You should follow this guide for import: https://cloud.google.com/healthcare-api/docs/how-tos/fhir-import-export 
Reply all
Reply to author
Forward
0 new messages