Skip to content

Commit

Permalink
Merge pull request #149 from companieshouse/feature/dsnd-3059_increas…
Browse files Browse the repository at this point in the history
…e_task_resources

DSND-3059: Increase resources and tasks
  • Loading branch information
johncook-ch authored Sep 6, 2024
2 parents fff828f + fc54b23 commit f7ff744
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions terraform/groups/ecs-service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module "ecs-service" {
# Service performance and scaling configs
desired_task_count = var.desired_task_count
max_task_count = var.max_task_count
min_task_count = var.min_task_count
required_cpus = var.required_cpus
required_memory = var.required_memory
service_autoscale_enabled = var.service_autoscale_enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ aws_profile = "live-eu-west-2"
# service configs
use_set_environment_files = true
log_level = "trace"

min_task_count = 5
required_cpus = 768
required_memory = 1536
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ aws_profile = "staging-eu-west-2"
use_set_environment_files = true
log_level = "trace"

min_task_count = 2
required_cpus = 768
required_memory = 1536

# Scheduled scaling of tasks
service_autoscale_enabled = true
service_scaledown_schedule = "55 19 * * ? *"
Expand Down
16 changes: 10 additions & 6 deletions terraform/groups/ecs-service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ variable "desired_task_count" {
description = "The desired ECS task count for this service"
default = 1 # defaulted low for dev environments, override for production
}
variable "max_task_count" {
type = number
description = "The maximum number of tasks for this service."
default = 10
}
variable "min_task_count" {
type = number
description = "The minimum number of tasks for this service."
default = 1
}
variable "required_cpus" {
type = number
description = "The required cpu resource for this service. 1024 here is 1 vCPU"
Expand All @@ -53,12 +63,6 @@ variable "eric_memory" {
default = 512
}

variable "max_task_count" {
type = number
description = "The maximum number of tasks for this service."
default = 10
}

variable "use_fargate" {
type = bool
description = "If true, sets the required capabilities for all containers in the task definition to use FARGATE, false uses EC2"
Expand Down

0 comments on commit f7ff744

Please sign in to comment.