This commit is contained in:
2022-09-18 09:29:12 -07:00
parent d65c87dc6d
commit a9c3f74909
5 changed files with 307 additions and 16 deletions

View File

@@ -4,6 +4,8 @@ variable "execution_role_arn" {}
variable "stage" {}
variable "job_name" {}
variable "schedule" {}
variable "cpu" { default = 2048 }
variable "memory" { default = 8192 }
@@ -11,8 +13,8 @@ resource "aws_ecs_task_definition" "background_taskdef" {
family = replace("${var.job_name}_${var.stage}", "-", "_")
container_definitions = replace(replace(file("./background-taskdef.json"), "STAGE", var.stage), "JOBX", var.job_name)
memory = 8192
cpu = 2048
memory = var.memory
cpu = var.cpu
network_mode = "awsvpc"
requires_compatibilities = ["FARGATE"]
execution_role_arn = var.execution_role_arn