-
Notifications
You must be signed in to change notification settings - Fork 33
Use custom service account for search dataform #3800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,19 @@ resource "google_project_iam_custom_role" "gds_bigquery_read_access" { | |
| title = "GDS BQ read access" | ||
| } | ||
|
|
||
| resource "google_project_iam_custom_role" "gds_bigquery_read_and_list_access" { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm adding this custom role, because for some of our pipelines that use a table wildcard, we need the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think because I'm only adding a list permission (rather than create or delete), it's not worth making a separate role, but I'm curious to know what other people think. |
||
| description = "Permissions to read and list BigQuery datasets and tables" | ||
| permissions = [ | ||
| "bigquery.datasets.get", | ||
| "bigquery.datasets.getIamPolicy", | ||
| "bigquery.tables.get", | ||
| "bigquery.tables.getData", | ||
| "bigquery.tables.list" | ||
| ] | ||
| role_id = "GDS_BQ_read_and_list_access" | ||
| title = "GDS BQ read and list access" | ||
| } | ||
|
|
||
| resource "google_project_iam_custom_role" "gds_bigquery_saved_query_writer" { | ||
| description = "Permissions to create, update and delete BigQuery saved queries" | ||
| permissions = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we only need to read from 2/17 datasets in the GA4 Analytics project, I've added these as dataset permissions instead of project permissions (which would give access to all the datasets). This might be overkill.
I've chosen to use
iam_memberinstead ofiam_bindingfor two reasons:If the permission set up looks okay, I'm not clear on how this new code should be organised. I've seen locals.tf files elsewhere. Maybe we should also have a separate file for dataset permissions 🤷🏻♀️