0
votes

Below is an example of GCS settings in storage.yml:

google:
  service: GCS
  credentials: <%= Rails.root.join("path/to/keyfile.json") %>
  project: ""
  bucket: ""

Since there is already project_id inside credentials, what is the purpose of project? Does this make any difference if I omit this key?

1

1 Answers

0
votes

This seems to be a requirement from Active Storage as mentioned here. Most likely, both parameters are needed due to the fact that you could create a service account in one project, and give it access to a different one. If you did this, the credentials of the service account would have the origin project, however, you could access the second project with the same file.