Skip to content

Commit 57d17a4

Browse files
committed
missing vars
1 parent 8ede3a5 commit 57d17a4

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

terraform/dev/main.tf

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,16 @@ resource "google_api_gateway_gateway" "gateway" {
151151
}
152152

153153
module "endpoints" {
154-
source = "./../modules/run-service"
155-
entry_point = "app"
156-
project = "httparchive"
157-
environment = "dev"
158-
source_directory = "../../src"
159-
function_name = "tech-report-api"
160-
service_account_email = var.google_service_account_cloud_functions
161-
service_account_api_gateway = var.google_service_account_api_gateway
154+
source = "./../modules/run-service"
155+
entry_point = "app"
156+
project = "httparchive"
157+
environment = "dev"
158+
source_directory = "../../src"
159+
function_name = "tech-report-api"
160+
service_account_email = var.google_service_account_cloud_functions
161+
service_account_api_gateway = var.google_service_account_api_gateway
162+
max_instance_request_concurrency = var.max_instance_request_concurrency
163+
min_instances = var.min_instances
162164
environment_variables = {
163165
"PROJECT" = "httparchive",
164166
"DATABASE" = var.project_database

terraform/modules/run-service/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
locals {
2-
bucketName = "tf-cloudfunctions-backingapi-20230314"
2+
bucketName = "tf-cloudfunctions-backingapi-20230314"
33
}
44
data "archive_file" "source" {
55
type = "zip"
@@ -13,7 +13,7 @@ resource "google_storage_bucket_object" "zip" {
1313
}
1414

1515
resource "google_cloudfunctions2_function" "function" {
16-
name = "${var.function_name}-${var.environment}"
16+
name = "${var.function_name}-${var.environment}"
1717
location = var.region
1818

1919
build_config {
@@ -35,11 +35,11 @@ resource "google_cloudfunctions2_function" "function" {
3535

3636
environment_variables = var.environment_variables
3737

38-
min_instance_count = var.min_instances
39-
max_instance_count = var.max_instances
40-
timeout_seconds = var.timeout
38+
min_instance_count = var.min_instances
39+
max_instance_count = var.max_instances
40+
timeout_seconds = var.timeout
4141
max_instance_request_concurrency = var.max_instance_request_concurrency
42-
service_account_email = var.service_account_email
42+
service_account_email = var.service_account_email
4343
}
4444

4545
labels = {
@@ -79,8 +79,8 @@ resource "google_cloudfunctions2_function_iam_member" "api_gw_variable_service_a
7979
cloud_function = google_cloudfunctions2_function.function.name
8080
role = "roles/cloudfunctions.invoker"
8181
#member = "serviceAccount:[email protected]"
82-
member = "serviceAccount:${var.service_account_api_gateway}"
83-
depends_on = [google_cloudfunctions2_function.function]
82+
member = "serviceAccount:${var.service_account_api_gateway}"
83+
depends_on = [google_cloudfunctions2_function.function]
8484
}
8585
// TODO: Conditionally apply if the function needs to be invoked by API Gateway
8686
resource "google_cloud_run_v2_service_iam_member" "api_gw_variable_service_account_run_invoker" {

terraform/modules/run-service/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ variable "secrets" {
33
}
44
variable "region" {
55
default = "us-east1"
6-
type = string
6+
type = string
77
}
88
variable "environment" {
99
description = "The 'Environment' that is being created/deployed. Applied as a suffix to many resources."

0 commit comments

Comments
 (0)