-
Notifications
You must be signed in to change notification settings - Fork 1
/
google_storage_bucket_iam_member.tf
44 lines (36 loc) · 1.42 KB
/
google_storage_bucket_iam_member.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
#
# For polyaxon users
#
resource "google_storage_bucket_iam_member" "sa_polyaxon_outputs_objectAdmin" {
bucket = google_storage_bucket.polyaxon_outputs.name
role = "roles/storage.objectAdmin"
member = "serviceAccount:${google_service_account.polyaxon.email}"
}
resource "google_storage_bucket_iam_member" "user_polyaxon_outputs_objectAdmin" {
for_each = toset(var.polyaxon_users)
bucket = google_storage_bucket.polyaxon_outputs.name
role = "roles/storage.objectAdmin"
member = each.key
}
resource "google_storage_bucket_iam_member" "sa_polyaxon_data_objectAdmin" {
bucket = google_storage_bucket.polyaxon_data.name
role = "roles/storage.objectAdmin"
member = "serviceAccount:${google_service_account.polyaxon.email}"
}
resource "google_storage_bucket_iam_member" "user_polyaxon_data_objectAdmin" {
for_each = toset(var.polyaxon_users)
bucket = google_storage_bucket.polyaxon_data.name
role = "roles/storage.objectAdmin"
member = each.key
}
resource "google_storage_bucket_iam_member" "sa_polyaxon_logs_objectAdmin" {
bucket = google_storage_bucket.polyaxon_logs.name
role = "roles/storage.objectAdmin"
member = "serviceAccount:${google_service_account.polyaxon.email}"
}
resource "google_storage_bucket_iam_member" "user_polyaxon_logs_objectAdmin" {
for_each = toset(var.polyaxon_users)
bucket = google_storage_bucket.polyaxon_logs.name
role = "roles/storage.objectAdmin"
member = each.key
}