File tree 4 files changed +7
-9
lines changed 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ This is a unified Google Cloud Run function that provides technology metrics and
13
13
14
14
``` bash
15
15
export PROJECT=httparchive
16
- export DATABASE=tech-report-apis -prod
16
+ export DATABASE=tech-report-api -prod
17
17
```
18
18
19
19
# ## Local Development
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ variable "environment" {
15
15
variable "project_database" {
16
16
type = string
17
17
description = " The database name"
18
- default = " tech-report-apis -prod" // TODO: Update this to the correct database name
18
+ default = " tech-report-api -prod" // TODO: Update this to the DEV database name
19
19
}
20
20
21
21
variable "google_service_account_cloud_functions" {
@@ -30,5 +30,5 @@ variable "google_service_account_api_gateway" {
30
30
variable "min_instances" {
31
31
description = " (Optional) The limit on the minimum number of function instances that may coexist at a given time."
32
32
type = number
33
- default = 1 # TODO: Update this to 0 after performance testing
33
+ default = 0
34
34
}
Original file line number Diff line number Diff line change @@ -72,17 +72,16 @@ resource "google_cloud_run_v2_service_iam_member" "variable_service_account_run_
72
72
role = " roles/run.invoker"
73
73
member = " serviceAccount:${ var . service_account_email } "
74
74
}
75
- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
75
+
76
76
resource "google_cloudfunctions2_function_iam_member" "api_gw_variable_service_account_function_invoker" {
77
77
project = google_cloudfunctions2_function. function . project
78
78
location = google_cloudfunctions2_function. function . location
79
79
cloud_function = google_cloudfunctions2_function. function . name
80
80
role = " roles/cloudfunctions.invoker"
81
- # member = "serviceAccount:[email protected] "
82
81
member = " serviceAccount:${ var . service_account_api_gateway } "
83
82
depends_on = [google_cloudfunctions2_function . function ]
84
83
}
85
- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
84
+
86
85
resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {
87
86
project = var. project
88
87
location = var. region
Original file line number Diff line number Diff line change @@ -73,17 +73,16 @@ resource "google_cloud_run_v2_service_iam_member" "variable_service_account_run_
73
73
role = " roles/run.invoker"
74
74
member = " serviceAccount:${ var . service_account_email } "
75
75
}
76
- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
76
+
77
77
resource "google_cloudfunctions2_function_iam_member" "api_gw_variable_service_account_function_invoker" {
78
78
project = google_cloudfunctions2_function. function . project
79
79
location = google_cloudfunctions2_function. function . location
80
80
cloud_function = google_cloudfunctions2_function. function . name
81
81
role = " roles/cloudfunctions.invoker"
82
- # member = "serviceAccount:[email protected] "
83
82
member = " serviceAccount:${ var . service_account_api_gateway } "
84
83
depends_on = [google_cloudfunctions2_function . function ]
85
84
}
86
- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
85
+
87
86
resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {
88
87
project = var. project
89
88
location = var. region
You can’t perform that action at this time.
0 commit comments