'Access Big Query from other Project

I am Managing two GCP projects by Terraform:

Production and Test.

There is an active Workflow running on Production which writes data in an Big Query Database. Now I want to create an Instance on Test to work with the data.

How can I access the Data in the Production Big Query from Test?

The service account has currently the roles roles/bigquery.dataEditor, roles/bigquery.jobUser and roles/bigquery.user but this seems project specific?



Solution 1:[1]

As suggested by @guillaume and @Stan, You can provide access to your dataset in Production project by giving the appropriate role to your Service Account/User in Test project. Refer to this documentation for detailed process.

Do note that, to be able to query the tables in the dataset you need permission to run a query job in the project, which can be done by assigning roles/bigquery.jobUser role to the service account/user for the project.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1