-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbq-dm.tf
62 lines (60 loc) · 1.86 KB
/
bq-dm.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Data warehouse
resource "google_bigquery_dataset" "dwh-bq-marketing" {
dataset_id = "MARKETING"
description = ""
project = google_project.data-marts.project_id
location = local.region
depends_on = [google_project_service.data-marts-service]
# Order of access matters
# WRITER -> OWNER -> READER
# access {
# role = "WRITER"
# group_by_email = "${local.unique_id}-ds@gmail.com"
# }
# access {
# role = "OWNER"
# group_by_email = "${local.unique_id}-de@gmail.com"
# }
# access {
# role = "READER"
# group_by_email = "${local.unique_id}-da@gmail.com"
# }
}
resource "google_bigquery_dataset" "dwh-bq-finance" {
dataset_id = "FINANCE"
description = ""
project = google_project.data-marts.project_id
location = local.region
depends_on = [google_project_service.data-marts-service]
# access {
# role = "WRITER"
# group_by_email = "${local.unique_id}-ds@gmail.com"
# }
# access {
# role = "OWNER"
# group_by_email = "${local.unique_id}-de@gmail.com"
# }
# access {
# role = "READER"
# group_by_email = "${local.unique_id}-da@gmail.com"
# }
}
resource "google_bigquery_dataset" "dwh-bq-sales" {
dataset_id = "SALES"
description = ""
project = google_project.data-marts.project_id
location = local.region
depends_on = [google_project_service.data-marts-service]
# access {
# role = "WRITER"
# group_by_email = "${local.unique_id}-ds@gmail.com"
# }
# access {
# role = "OWNER"
# group_by_email = "${local.unique_id}-de@gmail.com"
# }
# access {
# role = "READER"
# group_by_email = "${local.unique_id}-da@gmail.com"
# }
}