Skip to content

Commit 1bcd207

Browse files
committed
feat(bigquery): Add example for creating an authorized view
1 parent 69da499 commit 1bcd207

File tree

1 file changed

+2
-9
lines changed
  • bigquery/bigquery_authorized_view_tutorial

1 file changed

+2
-9
lines changed

bigquery/bigquery_authorized_view_tutorial/main.tf

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ resource "google_bigquery_dataset" "default" {
2828
dataset_id = "authdataset"
2929
description = "Dataset for authorized view"
3030
location = "us-west1"
31-
3231
}
3332

3433
/*
@@ -45,9 +44,6 @@ resource "google_bigquery_table" "default" {
4544
query = "SELECT item_id, avg(rating) FROM `myproject.movie_dataset.movie_ratings` GROUP BY item_id ORDER BY item_id;"
4645
use_legacy_sql = false
4746
}
48-
depends_on = [
49-
google_bigquery_dataset.default
50-
]
5147
}
5248

5349
/*
@@ -63,9 +59,6 @@ resource "google_bigquery_dataset_access" "default" {
6359
dataset_id = google_bigquery_table.default.dataset_id
6460
table_id = google_bigquery_table.default.table_id
6561
}
66-
depends_on = [
67-
google_bigquery_dataset.default
68-
]
6962
}
7063

7164
/*
@@ -88,8 +81,8 @@ Set the IAM policy on the authorized view.
8881
*/
8982
resource "google_bigquery_table_iam_policy" "default" {
9083
project = google_bigquery_table.default.project
91-
dataset_id = google_bigquery_dataset.default.dataset_id
92-
table_id = "authview"
84+
dataset_id = google_bigquery_table.default.dataset_id
85+
table_id = google_bigquery_table.default.table_id
9386
policy_data = data.google_iam_policy.default.policy_data
9487
}
9588
# [END bigquery_authorized_view_tutorial]

0 commit comments

Comments
 (0)