Cloud Run service account in Project1 has been given access to the BigQuery datasets in Project2.
I want to understand where the cost of the query will incur if the query is triggered by Cloud Run from Project1?
I understand the Cloud Run cost will be incurred on Project1, the BigQuery storage cost will be incurred at Project2, but where will the cost of the BigQuery slots consumption for the triggered query incur?
According to BigQuery Pricing, “Any charges incurred by BigQuery jobs run in the project are billed to the attached billing account”, meaning the project that executes the query job will incur the costs. You can also check this related discussion which explains how billing works with BigQuery across projects.
In your case, if Project 1 queries data from Project 2 using your Cloud Run service account, Project 1 will be billed. You can also view BigQuery costs and trends by using the Cloud Billing reports page in the Cloud Console.