Skip to content

Commit b28af22

Browse files
authored
Merge pull request #186 from companieshouse/feature/update-ecs-module-and-config
add scaledown, target cpu scaling, and update modules
2 parents c6a3d27 + a140f41 commit b28af22

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

terraform/groups/ecs-service/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ terraform {
1919
}
2020

2121
module "ecs-service" {
22-
source = "[email protected]:companieshouse/terraform-modules//aws/ecs/ecs-service?ref=1.0.253"
22+
source = "[email protected]:companieshouse/terraform-modules//aws/ecs/ecs-service?ref=1.0.287"
2323

2424
# Environmental configuration
2525
environment = var.environment
@@ -93,7 +93,7 @@ module "ecs-service" {
9393
eric_secrets = local.eric_secrets
9494
}
9595
module "secrets" {
96-
source = "[email protected]:companieshouse/terraform-modules//aws/ecs/secrets?ref=1.0.253"
96+
source = "[email protected]:companieshouse/terraform-modules//aws/ecs/secrets?ref=1.0.287"
9797

9898
name_prefix = "${local.service_name}-${var.environment}"
9999
environment = var.environment

terraform/groups/ecs-service/profiles/development-eu-west-2/cidev/vars

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ aws_profile = "development-eu-west-2"
33

44
# service configs
55
use_set_environment_files = true
6+
7+
# Scheduled scaling of tasks
8+
service_autoscale_enabled = true
9+
service_scaledown_schedule = "55 19 * * ? *"
10+
service_scaleup_schedule = "5 6 * * ? *"

terraform/groups/ecs-service/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ variable "service_autoscale_enabled" {
7777
variable "service_autoscale_target_value_cpu" {
7878
type = number
7979
description = "Target CPU percentage for the ECS Service to autoscale on"
80-
default = 50 # 100 disables autoscaling using CPU as a metric
80+
default = 80 # 100 disables autoscaling using CPU as a metric
8181
}
8282
variable "service_scaledown_schedule" {
8383
type = string

0 commit comments

Comments
 (0)