Skip to content

Commit 0c7d424

Browse files
committed
readuce cloud run scaling
1 parent 525b965 commit 0c7d424

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

infra/terraform/cloud_run.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ resource "google_cloud_run_v2_job" "checker" {
6464
location = var.region
6565

6666
template {
67-
task_count = var.checker_job_task_count
68-
parallelism = var.checker_job_task_count
67+
task_count = var.checker_job_task_count[terraform.workspace]
68+
parallelism = var.checker_job_task_count[terraform.workspace]
6969

7070
template {
7171
service_account = google_service_account.checker_runtime.email

infra/terraform/variables.tf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,14 @@ variable "checker_concurrency" {
146146
default = 10
147147
}
148148

149+
150+
149151
variable "checker_job_task_count" {
150-
type = number
151-
default = 4
152+
type = map(string)
153+
default = {
154+
dev = 1
155+
prod = 2
156+
}
152157
}
153158

154159
variable "api_cache_enabled" {

0 commit comments

Comments
 (0)