Skip to content

Commit 136e5ca

Browse files
committed
scale test
1 parent 3a8860c commit 136e5ca

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

terraform/dev/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ module "endpoints" {
140140
region = var.region
141141
service_account_email = var.google_service_account_cloud_functions
142142
service_account_api_gateway = var.google_service_account_api_gateway
143+
max_instances = var.max_instances
144+
min_instances = var.min_instances
145+
max_instance_request_concurrency = var.max_instance_request_concurrency
143146
environment_variables = {
144147
"PROJECT" = var.project
145148
"DATABASE" = var.project_database

terraform/dev/variables.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,19 @@ variable "google_service_account_api_gateway" {
2626
type = string
2727
description = "Service account for API Gateway"
2828
}
29+
30+
variable "max_instances" {
31+
default = 10
32+
type = number
33+
description = "(Optional) The limit on the maximum number of function instances that may coexist at a given time."
34+
}
35+
variable "min_instances" {
36+
description = "(Optional) The limit on the minimum number of function instances that may coexist at a given time."
37+
type = number
38+
default = 1
39+
}
40+
variable "max_instance_request_concurrency" {
41+
description = "(Optional) The limit on the maximum number of requests that an instance can handle simultaneously. This can be used to control costs when scaling. Defaults to 1."
42+
type = number
43+
default = 10
44+
}

0 commit comments

Comments
 (0)