File tree 4 files changed +24
-11
lines changed
4 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -144,14 +144,15 @@ terraform destroy
144
144
145
145
# Input reference
146
146
147
- | Name | Type | Required | Default |
148
- | --------------------------------| ------------| ----------| ------------|
149
- | ` server_service_account_email ` | ` string ` | Yes | N/A |
150
- | ` google_cloud_project_id ` | ` string ` | Yes | N/A |
151
- | ` resource_affix ` | ` string ` | Yes | N/A |
152
- | ` environment ` | ` string ` | No | ` "main" ` |
153
- | ` create_public_bucket ` | ` boolean ` | No | ` false ` |
154
- | ` deletion_protection ` | ` bool ` | No | ` true ` |
147
+ | Name | Type | Required | Default |
148
+ | ----------------------------------------| ------------| ----------| ------------|
149
+ | ` server_service_account_email ` | ` string ` | Yes | N/A |
150
+ | ` github_actions_service_account_email ` | ` string ` | Yes | N/A |
151
+ | ` google_cloud_project_id ` | ` string ` | Yes | N/A |
152
+ | ` resource_affix ` | ` string ` | Yes | N/A |
153
+ | ` environment ` | ` string ` | No | ` "main" ` |
154
+ | ` create_public_bucket ` | ` boolean ` | No | ` false ` |
155
+ | ` deletion_protection ` | ` bool ` | No | ` true ` |
155
156
156
157
See [ ` variables.tf ` ] ( /variables.tf ) for descriptions.
157
158
Original file line number Diff line number Diff line change 1
- 0.1.0
1
+ 0.1.1
Original file line number Diff line number Diff line change @@ -25,11 +25,17 @@ resource "google_storage_bucket_iam_member" "static_assets_object_viewer" {
25
25
}
26
26
27
27
28
- # Allow the server to administer what's on the staging bucket
28
+ # Allow the server to administer what's on the static bucket.
29
29
resource "google_storage_bucket_iam_member" "static_assets_object_admin" {
30
+ for_each = toset (
31
+ [
32
+ " serviceAccount:${ var . server_service_account_email } " ,
33
+ " serviceAccount:${ var . github_actions_service_account_email } "
34
+ ]
35
+ )
30
36
bucket = google_storage_bucket. static_assets . name
31
37
role = " roles/storage.objectAdmin"
32
- member = " serviceAccount: ${ var . server_service_account_email } "
38
+ member = each . value
33
39
}
34
40
35
41
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ variable "server_service_account_email" {
4
4
}
5
5
6
6
7
+ variable "github_actions_service_account_email" {
8
+ type = string
9
+ description = " The email address of the GitHub Actions service account."
10
+ }
11
+
12
+
7
13
variable "google_cloud_project_id" {
8
14
type = string
9
15
description = " The ID of the GCP project to deploy resources in."
You can’t perform that action at this time.
0 commit comments