diff --git a/README.md b/README.md index 02d4c94..febcbc4 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,10 @@ No modules. | <a name="input_s3_logs_bucket"></a> [s3\_logs\_bucket](#input\_s3\_logs\_bucket) | Name of the S3 bucket to deliver logs to | `string` | `null` | no | | <a name="input_s3_logs_enabled"></a> [s3\_logs\_enabled](#input\_s3\_logs\_enabled) | Indicates whether you want to enable or disable streaming broker logs to S3 | `bool` | `false` | no | | <a name="input_s3_logs_prefix"></a> [s3\_logs\_prefix](#input\_s3\_logs\_prefix) | Prefix to append to the folder name | `string` | `null` | no | +| <a name="input_scaling_disable_scale_in"></a> [scaling\_disable\_scale\_in](#input\_scaling\_disable\_scale\_in) | Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. | `bool` | `false` | no | +| <a name="input_scaling_in_cooldown"></a> [scaling\_in\_cooldown](#input\_scaling\_in\_cooldown) | Amount of time, in seconds, after a scale in activity completes before another scale in activity can start | `number` | `0` | no | | <a name="input_scaling_max_capacity"></a> [scaling\_max\_capacity](#input\_scaling\_max\_capacity) | Max storage capacity for Kafka broker autoscaling | `number` | `250` | no | +| <a name="input_scaling_out_cooldown"></a> [scaling\_out\_cooldown](#input\_scaling\_out\_cooldown) | Amount of time, in seconds, after a scale out activity completes before another scale out activity can start | `number` | `0` | no | | <a name="input_scaling_role_arn"></a> [scaling\_role\_arn](#input\_scaling\_role\_arn) | The ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role | `string` | `null` | no | | <a name="input_scaling_target_value"></a> [scaling\_target\_value](#input\_scaling\_target\_value) | The Kafka broker storage utilization at which scaling is initiated | `number` | `70` | no | | <a name="input_schema_registries"></a> [schema\_registries](#input\_schema\_registries) | A map of schema registries to be created | `map(any)` | `{}` | no | diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 1280779..71c1acb 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -80,8 +80,11 @@ module "msk_cluster" { s3_logs_bucket = module.s3_logs_bucket.s3_bucket_id s3_logs_prefix = local.name - scaling_max_capacity = 512 - scaling_target_value = 80 + scaling_max_capacity = 512 + scaling_target_value = 80 + scaling_in_cooldown = 0 + scaling_out_cooldown = 0 + scaling_disable_scale_in = false client_authentication = { sasl = { scram = true } diff --git a/main.tf b/main.tf index cc16594..229e669 100644 --- a/main.tf +++ b/main.tf @@ -255,7 +255,10 @@ resource "aws_appautoscaling_policy" "this" { predefined_metric_type = "KafkaBrokerStorageUtilization" } - target_value = var.scaling_target_value + target_value = var.scaling_target_value + disable_scale_in = var.scaling_disable_scale_in + scale_in_cooldown = var.scaling_in_cooldown + scale_out_cooldown = var.scaling_out_cooldown } } diff --git a/variables.tf b/variables.tf index c93585a..9f88d0a 100644 --- a/variables.tf +++ b/variables.tf @@ -280,6 +280,24 @@ variable "scaling_target_value" { default = 70 } +variable "scaling_disable_scale_in" { + description = "Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource." + type = bool + default = false +} + +variable "scaling_in_cooldown" { + description = "Amount of time, in seconds, after a scale in activity completes before another scale in activity can start" + type = number + default = 0 +} + +variable "scaling_out_cooldown" { + description = "Amount of time, in seconds, after a scale out activity completes before another scale out activity can start" + type = number + default = 0 +} + ################################################################################ # Glue Schema Registry & Schema ################################################################################