File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
deployment/modules/gcp/cloudrun Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
resource "google_service_account" "cloudrun_service_account" {
2
- account_id = " cloudrun- ${ var . env } -sa "
2
+ account_id = var. cloudrun_service_account_id
3
3
display_name = " Service Account for Cloud Run (${ var . env } )"
4
4
}
5
5
Original file line number Diff line number Diff line change
1
+ output "cloudrun_service_account" {
2
+ description = " The Cloud Run service account"
3
+ value = google_service_account. cloudrun_service_account
4
+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ variable "env" {
8
8
type = string
9
9
}
10
10
11
+ variable "cloudrun_service_account_id" {
12
+ description = " The Clour Run service account ID to be created"
13
+ type = string
14
+ }
15
+
11
16
variable "bucket" {
12
17
description = " Log GCS bucket"
13
18
type = string
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ module "cloudrun_iam" {
26
26
}
27
27
28
28
locals {
29
+ cloudrun_service_account_id = " cloudrun-${ var . env } -sa"
29
30
spanner_log_db_path = " projects/${ var . project_id } /instances/${ var . log_spanner_instance } /databases/${ var . log_spanner_db } "
30
31
spanner_dedup_db_path = " projects/${ var . project_id } /instances/${ var . log_spanner_instance } /databases/${ var . dedup_spanner_db } "
31
32
}
@@ -36,7 +37,7 @@ resource "google_cloud_run_v2_service" "default" {
36
37
launch_stage = " GA"
37
38
38
39
template {
39
- service_account = google_service_account . cloudrun_service_account . account_id
40
+ service_account = module . cloudrun_iam . cloudrun_service_account . account_id
40
41
max_instance_request_concurrency = 700
41
42
timeout = " 5s"
42
43
You can’t perform that action at this time.
0 commit comments