diff --git a/mmv1/products/compute/Autoscaler.yaml b/mmv1/products/compute/Autoscaler.yaml index 8ca1a6398322..d47edad7e5d5 100644 --- a/mmv1/products/compute/Autoscaler.yaml +++ b/mmv1/products/compute/Autoscaler.yaml @@ -153,6 +153,16 @@ properties: and time the startup process. api_name: coolDownPeriodSec default_value: 60 + - name: 'stabilizationPeriod' + type: Integer + description: | + The number of seconds that the autoscaler waits for load stabilization + before making scale-in decisions. + + This might appear as a delay in scaling in but it is an important mechanism + for your application to not have fluctuating size due to short term load + fluctuations. + api_name: stabilizationPeriodSec - name: 'mode' type: String description: | diff --git a/mmv1/products/compute/RegionAutoscaler.yaml b/mmv1/products/compute/RegionAutoscaler.yaml index 9c7c9f411f66..614a8c05ce20 100644 --- a/mmv1/products/compute/RegionAutoscaler.yaml +++ b/mmv1/products/compute/RegionAutoscaler.yaml @@ -132,6 +132,16 @@ properties: and time the startup process. api_name: coolDownPeriodSec default_value: 60 + - name: 'stabilizationPeriod' + type: Integer + description: | + The number of seconds that the autoscaler waits for load stabilization + before making scale-in decisions. + + This might appear as a delay in scaling in but it is an important mechanism + for your application to not have fluctuating size due to short term load + fluctuations. + api_name: stabilizationPeriodSec - name: 'mode' type: String description: | diff --git a/mmv1/templates/terraform/examples/autoscaler_basic.tf.tmpl b/mmv1/templates/terraform/examples/autoscaler_basic.tf.tmpl index d9854df5960b..93ac3eef20e6 100644 --- a/mmv1/templates/terraform/examples/autoscaler_basic.tf.tmpl +++ b/mmv1/templates/terraform/examples/autoscaler_basic.tf.tmpl @@ -7,6 +7,7 @@ resource "google_compute_autoscaler" "foobar" { max_replicas = 5 min_replicas = 1 cooldown_period = 60 + stabilization_period = 300 cpu_utilization { target = 0.5 diff --git a/mmv1/templates/terraform/examples/autoscaler_single_instance.tf.tmpl b/mmv1/templates/terraform/examples/autoscaler_single_instance.tf.tmpl index 728f2e2416d2..61dbca4e0d16 100644 --- a/mmv1/templates/terraform/examples/autoscaler_single_instance.tf.tmpl +++ b/mmv1/templates/terraform/examples/autoscaler_single_instance.tf.tmpl @@ -9,6 +9,7 @@ resource "google_compute_autoscaler" "{{$.PrimaryResourceId}}" { max_replicas = 5 min_replicas = 1 cooldown_period = 60 + stabilization_period = 300 metric { name = "pubsub.googleapis.com/subscription/num_undelivered_messages" @@ -76,4 +77,4 @@ provider "google-beta" { region = "us-central1" zone = "us-central1-a" {{index $.Vars "provider_alias"}} -} \ No newline at end of file +} diff --git a/mmv1/templates/terraform/examples/region_autoscaler_basic.tf.tmpl b/mmv1/templates/terraform/examples/region_autoscaler_basic.tf.tmpl index 0623a608d612..74e97de935cc 100644 --- a/mmv1/templates/terraform/examples/region_autoscaler_basic.tf.tmpl +++ b/mmv1/templates/terraform/examples/region_autoscaler_basic.tf.tmpl @@ -7,6 +7,7 @@ resource "google_compute_region_autoscaler" "{{$.PrimaryResourceId}}" { max_replicas = 5 min_replicas = 1 cooldown_period = 60 + stabilization_period = 300 cpu_utilization { target = 0.5