Skip to content

Commit

Permalink
add task cpu/mem
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Mar 12, 2024
1 parent aa867c2 commit df56bb5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions service/task_def.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ resource "aws_ecs_task_definition" "default" {

network_mode = "awsvpc"

task_cpu = var.task_cpu
task_memory = var.task_memory

dynamic "volume" {
for_each = var.efs_volumes
content {
Expand Down Expand Up @@ -47,6 +50,9 @@ resource "aws_ecs_task_definition" "ignore_changes" {

network_mode = "awsvpc"

task_cpu = var.task_cpu
task_memory = var.task_memory

ephemeral_storage {
size_in_gib = var.ephemeral_storage_size_in_gib
}
Expand Down
12 changes: 12 additions & 0 deletions service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,15 @@ variable "ephemeral_storage_size_in_gib" {
description = "The size of the ephemeral storage to use for the task definition"
default = 30
}

variable "task_cpu" {
type = string
description = "The amount of CPU to use for the task definition"
default = "256"
}

variable "task_memory" {
type = string
description = "The amount of memory to use for the task definition"
default = "512"
}

0 comments on commit df56bb5

Please sign in to comment.