Skip to content

Commit addc1f4

Browse files
committed
switch to us-central db
1 parent 7dd31b5 commit addc1f4

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

terraform/dev/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ variable "environment" {
1515
variable "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

2121
variable "google_service_account_cloud_functions" {
@@ -30,5 +30,5 @@ variable "google_service_account_api_gateway" {
3030
variable "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
}

terraform/modules/cloud-function/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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+
7676
resource "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:[email protected]"
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+
8685
resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {
8786
project = var.project
8887
location = var.region

terraform/modules/run-service/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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+
7777
resource "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:[email protected]"
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+
8786
resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {
8887
project = var.project
8988
location = var.region

0 commit comments

Comments
 (0)