Skip to content

Commit

Permalink
fix: Use fully scoped keys for views in Terraform (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored May 27, 2020
1 parent 0687d36 commit c80e1a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/authorization/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

locals {
roles = { for role in var.roles : role["role"] => role }
views = { for view in var.authorized_views : view["table_id"] => view }
views = { for view in var.authorized_views : "${view["project_id"]}_${view["dataset_id"]}_${view["table_id"]}" => view }

iam_to_primitive = {
"roles/bigquery.dataOwner" : "OWNER"
Expand All @@ -32,7 +32,7 @@ resource "google_bigquery_dataset_access" "authorized_view" {
view {
project_id = each.value.project_id
dataset_id = each.value.dataset_id
table_id = each.key
table_id = each.value.table_id
}
}

Expand Down

0 comments on commit c80e1a4

Please sign in to comment.