Skip to content

Commit c07288b

Browse files
committed
test min instances on half endpoints
1 parent c5f0332 commit c07288b

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

terraform/dev/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ module "cwvtech" {
175175
function_name = "cwvtech"
176176
service_account_email = var.google_service_account_cloud_functions
177177
service_account_api_gateway = var.google_service_account_api_gateway
178-
min_instances = var.min_instances
179178
environment_variables = {
180179
"PROJECT" = "httparchive",
181180
"DATABASE" = var.project_database

terraform/dev/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ variable "project_database" {
1717
variable "min_instances" {
1818
description = "(Optional) The limit on the minimum number of function instances that may coexist at a given time."
1919
type = number
20-
default = 1
20+
default = 0
2121
}

terraform/prod/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ resource "google_api_gateway_api" "api" {
2020
}
2121

2222
resource "google_api_gateway_api_config" "api_config" {
23-
provider = google-beta
23+
provider = google-beta
2424
api = google_api_gateway_api.api.api_id
2525
api_config_id_prefix = "api"
2626
project = "httparchive"
2727
display_name = "The prod Config"
2828
openapi_documents {
2929
document {
30-
path = "spec.yaml"
30+
path = "spec.yaml"
3131
contents = base64encode(<<-EOF
3232
swagger: "2.0"
3333
info:
@@ -204,6 +204,7 @@ module "adoption" {
204204
function_name = "adoption"
205205
service_account_email = var.google_service_account_cloud_functions
206206
service_account_api_gateway = var.google_service_account_api_gateway
207+
min_instances = var.min_instances
207208
environment_variables = {
208209
"PROJECT" = "httparchive",
209210
"DATABASE" = var.project_database
@@ -219,6 +220,7 @@ module "page-weight" {
219220
function_name = "page-weight"
220221
service_account_email = var.google_service_account_cloud_functions
221222
service_account_api_gateway = var.google_service_account_api_gateway
223+
min_instances = var.min_instances
222224
environment_variables = {
223225
"PROJECT" = "httparchive",
224226
"DATABASE" = var.project_database
@@ -234,6 +236,7 @@ module "categories" {
234236
function_name = "categories"
235237
service_account_email = var.google_service_account_cloud_functions
236238
service_account_api_gateway = var.google_service_account_api_gateway
239+
min_instances = var.min_instances
237240
environment_variables = {
238241
"PROJECT" = "httparchive",
239242
"DATABASE" = var.project_database

terraform/prod/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ variable "project_database" {
1717
variable "min_instances" {
1818
description = "(Optional) The limit on the minimum number of function instances that may coexist at a given time."
1919
type = number
20-
default = 0
20+
default = 1
2121
}

0 commit comments

Comments
 (0)