My problem is I get an api error when I run my docker image: "ApiError: Anonymous caller does not have storage.objects.get access to the Google Cloud Storage Object.
Verified my ServiceAccountKey.json had the correct credentials and IAM roles (Firebase Admin SDK Service Agent, Service Account Token Creator, Storage Admin, Storage Object Admin).
on the Docker file I install google Cloud SDK and authenticate it by RUN curl -sSL https://sdk.cloud.google.com | bash ENV PATH $PATH:/root/google-cloud-sdk/bin RUN gcloud auth activate-service-account --key-file=ServiceAccountKey.json RUN gcloud --quiet config set project myproject
I have my env variables handled by dotenv and the .env file is copied into the image
my image is built without any errors
My code works 100% fine locally and works as follows
- Triggers on Updates on documents in a collection
- Gets a latex template from a bucket
- Converts the Latex document to a pdf
- Save the pdf into the another bucket for processed pdfs
- Email the pdf The docker image is able to look for the update triggers correctly. It even finds the template in the bucket. The issue lies in it not being able to download the template from the bucket because of the ERROR message above