grafana / google-bigquery-datasource

Google BigQuery Datasource Plugin for Grafana.
Apache License 2.0
26 stars 13 forks source link

Feature: Add support for multi-project setup #104

Closed dprokop closed 2 years ago

dprokop commented 2 years ago

In https://github.com/grafana/google-bigquery-datasource/issues/101 chrisleavoy described an architecture that surfaced several issues current user experience suffers from.

The limitations are caused by the false assumption that when using GCE authentication both the VM running Grafana and BigQuery data are "located" under the same GCP project. A good example of an exception to that rule is well described in https://github.com/grafana/google-bigquery-datasource/issues/101#issuecomment-1101420096 and illustrated in the following diagram:

Screenshot 2022-04-19 at 14 37 14

The following PRs:

introduced an option to configure a GCP project that will be responsible for running BigQuery jobs.

While queries can be performed cross-project thanks to the mentioned changes, there is no UI for the user to choose datasets from different projects when using either Visual Query Builder or Code Editor. It's especially problematic with the VQB, as data source will always ask for GCE's default project's datasest, which may not contain any BigQuery datasets.

In order to support this scenario we need to introduce several changes to both data source implementation and the user interface:

dprokop commented 2 years ago

@zoltanbedi @oscarkilhed: cross-project service account/IAM details: https://stackoverflow.com/questions/35479025/cross-project-management-using-service-account

dprokop commented 2 years ago

@chrisleavoy this feature is now released with V1.1.0, hope it's gonna make your setup work even better now!