File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
Expand file tree Collapse file tree 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
1313
1414 ``` bash
1515 export PROJECT=httparchive
16- export DATABASE=tech-report-apis -prod
16+ export DATABASE=tech-report-api -prod
1717 ```
1818
1919# ## Local Development
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ variable "environment" {
1515variable "project_database" {
1616 type = string
1717 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
1919}
2020
2121variable "google_service_account_cloud_functions" {
@@ -30,5 +30,5 @@ variable "google_service_account_api_gateway" {
3030variable "min_instances" {
3131 description = " (Optional) The limit on the minimum number of function instances that may coexist at a given time."
3232 type = number
33- default = 1 # TODO: Update this to 0 after performance testing
33+ default = 0
3434}
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_
7272 role = " roles/run.invoker"
7373 member = " serviceAccount:${ var . service_account_email } "
7474}
75- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
75+
7676resource "google_cloudfunctions2_function_iam_member" "api_gw_variable_service_account_function_invoker" {
7777 project = google_cloudfunctions2_function. function . project
7878 location = google_cloudfunctions2_function. function . location
7979 cloud_function = google_cloudfunctions2_function. function . name
8080 role = " roles/cloudfunctions.invoker"
81- # member = "serviceAccount:api-gateway@httparchive.iam.gserviceaccount.com"
8281 member = " serviceAccount:${ var . service_account_api_gateway } "
8382 depends_on = [google_cloudfunctions2_function . function ]
8483}
85- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
84+
8685resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {
8786 project = var. project
8887 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_
7373 role = " roles/run.invoker"
7474 member = " serviceAccount:${ var . service_account_email } "
7575}
76- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
76+
7777resource "google_cloudfunctions2_function_iam_member" "api_gw_variable_service_account_function_invoker" {
7878 project = google_cloudfunctions2_function. function . project
7979 location = google_cloudfunctions2_function. function . location
8080 cloud_function = google_cloudfunctions2_function. function . name
8181 role = " roles/cloudfunctions.invoker"
82- # member = "serviceAccount:api-gateway@httparchive.iam.gserviceaccount.com"
8382 member = " serviceAccount:${ var . service_account_api_gateway } "
8483 depends_on = [google_cloudfunctions2_function . function ]
8584}
86- // TODO: Conditionally apply if the function needs to be invoked by API Gateway
85+
8786resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {
8887 project = var. project
8988 location = var. region
You can’t perform that action at this time.
0 commit comments