Skip to content

Commit b481df6

Browse files
Add max instance count field to Cloud Run Service (#14724) (#1095)
[upstream:22a40032828fb18bbb472f686e94fed8b93b254d] Signed-off-by: Modular Magician <[email protected]>
1 parent 6f3696b commit b481df6

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

cloudrunv2_service_basic/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ resource "google_cloud_run_v2_service" "default" {
33
location = "us-central1"
44
deletion_protection = false
55
ingress = "INGRESS_TRAFFIC_ALL"
6+
7+
scaling {
8+
max_instance_count = 100
9+
}
610

711
template {
812
containers {

cloudrunv2_service_gpu/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ resource "google_cloud_run_v2_service" "default" {
44
deletion_protection = false
55
ingress = "INGRESS_TRAFFIC_ALL"
66

7+
scaling {
8+
max_instance_count = 1
9+
}
10+
711
template {
812
containers {
913
image = "us-docker.pkg.dev/cloudrun/container/hello"
@@ -20,8 +24,5 @@ resource "google_cloud_run_v2_service" "default" {
2024
accelerator = "nvidia-l4"
2125
}
2226
gpu_zonal_redundancy_disabled = true
23-
scaling {
24-
max_instance_count = 1
25-
}
2627
}
2728
}

cloudrunv2_service_sql/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ resource "google_cloud_run_v2_service" "default" {
44
deletion_protection = false
55
ingress = "INGRESS_TRAFFIC_ALL"
66

7-
template {
8-
scaling {
9-
max_instance_count = 2
10-
}
11-
7+
scaling {
8+
max_instance_count = 2
9+
}
10+
11+
template {
1212
volumes {
1313
name = "cloudsql"
1414
cloud_sql_instance {

0 commit comments

Comments
 (0)