-
Notifications
You must be signed in to change notification settings - Fork 14
/
gcs.tf
66 lines (59 loc) · 2.13 KB
/
gcs.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
63
64
65
66
# GCS resources
resource "google_storage_bucket" "gcs-data-lake-landing" {
name = "${google_project.data-lake.project_id}-landing"
project = google_project.data-lake.project_id
location = local.region
force_destroy = true
storage_class = "STANDARD"
}
resource "google_storage_bucket" "gcs-data-lake-sensitive" {
name = "${google_project.data-lake.project_id}-sensitive"
project = google_project.data-lake.project_id
location = local.region
force_destroy = true
storage_class = "STANDARD"
}
resource "google_storage_bucket" "gcs-data-lake-work" {
name = "${google_project.data-lake.project_id}-work"
project = google_project.data-lake.project_id
location = local.region
force_destroy = true
storage_class = "STANDARD"
}
resource "google_storage_bucket" "gcs-data-lake-backup" {
name = "${google_project.data-lake.project_id}-backup"
project = google_project.data-lake.project_id
location = local.region
force_destroy = true
storage_class = "STANDARD"
}
# ACL configs
# resource "google_storage_bucket_acl" "gcs-data-lake-landing-acl" {
# bucket = google_storage_bucket.gcs-data-lake-landing.name
# role_entity = [
# # Leave the user prefix. Chane to other when necessary
# "OWNER:user-${local.unique_id}[email protected]",
# "READER:${local.unique_id}[email protected]",
# ]
# }
# resource "google_storage_bucket_acl" "gcs-data-lake-sensitive-acl" {
# bucket = google_storage_bucket.gcs-data-lake-sensitive.name
# role_entity = [
# "OWNER:user-${local.unique_id}[email protected]",
# "READER:${local.unique_id}[email protected]",
# ]
# }
# resource "google_storage_bucket_acl" "gcs-data-lake-work-acl" {
# bucket = google_storage_bucket.gcs-data-lake-work.name
# role_entity = [
# "OWNER:user-${local.unique_id}[email protected]",
# "WRITER:${local.unique_id}[email protected]",
# ]
# }
# resource "google_storage_bucket_acl" "gcs-data-lake-backup-acl" {
# bucket = google_storage_bucket.gcs-data-lake-backup.name
# role_entity = [
# "OWNER:user-${local.unique_id}[email protected]",
# "READER:${local.unique_id}[email protected]",
# ]
# }