diff --git a/README.md b/README.md index de151ee..d50c3e7 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ Terraform module which creates a ecs app | [ecr](#module\_ecr) | terraform-aws-modules/ecr/aws | 1.6.0 | | [ecr\_label](#module\_ecr\_label) | justtrackio/label/null | 0.26.0 | | [ecs\_label](#module\_ecs\_label) | justtrackio/label/null | 0.26.0 | -| [ecs\_service\_task\_customized\_autoscaling](#module\_ecs\_service\_task\_customized\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.1.0 | -| [ecs\_service\_task\_predefined\_autoscaling](#module\_ecs\_service\_task\_predefined\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.1.0 | -| [ecs\_service\_task\_schedule](#module\_ecs\_service\_task\_schedule) | justtrackio/ecs-autoscaling/aws | 1.1.0 | +| [ecs\_service\_task\_customized\_autoscaling](#module\_ecs\_service\_task\_customized\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.2.0 | +| [ecs\_service\_task\_predefined\_autoscaling](#module\_ecs\_service\_task\_predefined\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.2.0 | +| [ecs\_service\_task\_schedule](#module\_ecs\_service\_task\_schedule) | justtrackio/ecs-autoscaling/aws | 1.2.0 | | [monitoring](#module\_monitoring) | justtrackio/ecs-gosoline-monitoring/aws | 2.3.2 | | [sentry](#module\_sentry) | justtrackio/project/sentry | 1.3.0 | | [service\_task](#module\_service\_task) | justtrackio/ecs-alb-service-task/aws | 1.4.0 | @@ -142,6 +142,7 @@ Terraform module which creates a ecs app | [log\_router\_image\_tag](#input\_log\_router\_image\_tag) | The default container image to use in container definition | `string` | `"stable-2.2.2"` | no | | [log\_router\_options](#input\_log\_router\_options) | The log router options to use | `map(string)` |
{
"config-file-type": "file",
"config-file-value": "/fluent-bit/etc/extra.conf"
}
| no | | [log\_router\_type](#input\_log\_router\_type) | The log router type to use | `string` | `"fluentbit"` | no | +| [metric\_based\_autoscaling\_ignore\_changes\_min\_max\_capacity](#input\_metric\_based\_autoscaling\_ignore\_changes\_min\_max\_capacity) | Whether or not to ignore min\_capacity/max\_capacity changes on the aws\_appautoscaling\_target of the metric based autoscaling module | `bool` | `false` | no | | [metric\_enabled](#input\_metric\_enabled) | Defines if metrics should be written | `bool` | n/a | yes | | [monitoring\_enabled](#input\_monitoring\_enabled) | Defines if the monitoring module should be created | `bool` | `true` | no | | [mpr\_enabled](#input\_mpr\_enabled) | Whether to use the StreamMprMessagesPerRunner metric for autoscaling (gosoline feature), see: https://github.com/justtrackio/gosoline | `bool` | `null` | no | @@ -156,6 +157,7 @@ Terraform module which creates a ecs app | [port\_metadata](#input\_port\_metadata) | Define the metadata port | `number` | `8070` | no | | [propagate\_tags](#input\_propagate\_tags) | Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK\_DEFINITION | `string` | `null` | no | | [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no | +| [scheduled\_autoscaling\_ignore\_changes\_min\_max\_capacity](#input\_scheduled\_autoscaling\_ignore\_changes\_min\_max\_capacity) | Whether or not to ignore min\_capacity/max\_capacity changes on the aws\_appautoscaling\_target of the scheduled autoscaling module | `bool` | `true` | no | | [sentry\_dsn](#input\_sentry\_dsn) | Define a custom sentry dsn if `sentry_enabled` is set to `false` | `string` | `null` | no | | [sentry\_enabled](#input\_sentry\_enabled) | Set to false to prevent the module from creating any resources for sentry | `bool` | `true` | no | | [service\_placement\_constraints](#input\_service\_placement\_constraints) | The rules that are taken into consideration during task placement. Maximum number of placement\_constraints is 10. See [`placement_constraints`](https://www.terraform.io/docs/providers/aws/r/ecs_service.html#placement_constraints-1) docs |
list(object({
type = string
expression = string
}))
| `[]` | no | diff --git a/autoscaling.tf b/autoscaling.tf index a92a20c..171ba77 100644 --- a/autoscaling.tf +++ b/autoscaling.tf @@ -34,16 +34,17 @@ module "cloudwatch_label" { module "ecs_service_task_predefined_autoscaling" { count = local.predefined_autoscaling_enabled ? 1 : 0 source = "justtrackio/ecs-autoscaling/aws" - version = "1.1.0" + version = "1.2.0" context = module.this.context - aws_account_id = module.this.aws_account_id - cluster_name = data.aws_ecs_cluster.default.cluster_name - service_name = module.ecs_label.id - enabled = var.autoscaling_enabled - min_capacity = var.autoscaling_min_capacity - max_capacity = var.autoscaling_max_capacity + aws_account_id = module.this.aws_account_id + cluster_name = data.aws_ecs_cluster.default.cluster_name + service_name = module.ecs_label.id + enabled = var.autoscaling_enabled + min_capacity = var.autoscaling_min_capacity + max_capacity = var.autoscaling_max_capacity + ignore_changes_min_max_capacity = var.metric_based_autoscaling_ignore_changes_min_max_capacity target_tracking = [{ target_value = local.autoscaling_predefined_target_value scale_in_cooldown = var.autoscaling_scale_in_cooldown @@ -63,16 +64,17 @@ module "ecs_service_task_predefined_autoscaling" { module "ecs_service_task_customized_autoscaling" { count = local.customized_autoscaling_enabled ? 1 : 0 source = "justtrackio/ecs-autoscaling/aws" - version = "1.1.0" + version = "1.2.0" context = module.this.context - aws_account_id = module.this.aws_account_id - cluster_name = data.aws_ecs_cluster.default.cluster_name - service_name = module.ecs_label.id - enabled = var.autoscaling_enabled - min_capacity = var.autoscaling_min_capacity - max_capacity = var.autoscaling_max_capacity + aws_account_id = module.this.aws_account_id + cluster_name = data.aws_ecs_cluster.default.cluster_name + service_name = module.ecs_label.id + enabled = var.autoscaling_enabled + min_capacity = var.autoscaling_min_capacity + max_capacity = var.autoscaling_max_capacity + ignore_changes_min_max_capacity = var.metric_based_autoscaling_ignore_changes_min_max_capacity target_tracking = [{ target_value = local.autoscaling_customized_target_value scale_in_cooldown = var.autoscaling_scale_in_cooldown @@ -94,13 +96,14 @@ module "ecs_service_task_customized_autoscaling" { module "ecs_service_task_schedule" { count = var.autoscaling_enabled && length(var.autoscaling_schedule) > 0 ? 1 : 0 source = "justtrackio/ecs-autoscaling/aws" - version = "1.1.0" + version = "1.2.0" context = module.this.context - aws_account_id = module.this.aws_account_id - cluster_name = data.aws_ecs_cluster.default.cluster_name - service_name = module.ecs_label.id - enabled = var.autoscaling_enabled - schedule = var.autoscaling_schedule + aws_account_id = module.this.aws_account_id + cluster_name = data.aws_ecs_cluster.default.cluster_name + service_name = module.ecs_label.id + enabled = var.autoscaling_enabled + schedule = var.autoscaling_schedule + ignore_changes_min_max_capacity = var.scheduled_autoscaling_ignore_changes_min_max_capacity } diff --git a/variables.tf b/variables.tf index 7437d23..ceabe0c 100644 --- a/variables.tf +++ b/variables.tf @@ -533,6 +533,12 @@ variable "metric_enabled" { description = "Defines if metrics should be written" } +variable "metric_based_autoscaling_ignore_changes_min_max_capacity" { + type = bool + description = "Whether or not to ignore min_capacity/max_capacity changes on the aws_appautoscaling_target of the metric based autoscaling module" + default = false +} + variable "monitoring_enabled" { type = bool default = true @@ -601,6 +607,12 @@ variable "propagate_tags" { default = null } +variable "scheduled_autoscaling_ignore_changes_min_max_capacity" { + type = bool + description = "Whether or not to ignore min_capacity/max_capacity changes on the aws_appautoscaling_target of the scheduled autoscaling module" + default = true +} + variable "sentry_dsn" { type = string description = "Define a custom sentry dsn if `sentry_enabled` is set to ``false"