Set better defaults and make task size and memory configurable (#140)
This commit is contained in:
1 parent
757bd3cbae
commit
e000ea39e2
2 files changed
+16
-4
No files matched your search
@@ -32,15 +32,15 @@ resource "aws_ecs_task_definition" "osquery_perf" {
|
||||
requires_compatibilities = ["FARGATE"]
|
||||
execution_role_arn = var.ecs_execution_iam_role_arn
|
||||
task_role_arn = var.ecs_iam_role_arn
|
||||
cpu = 256
|
||||
memory = 1024
|
||||
cpu = var.task_size.cpu
|
||||
memory = var.task_size.memory
|
||||
container_definitions = jsonencode(
|
||||
[
|
||||
{
|
||||
name = "osquery-perf"
|
||||
image = var.osquery_perf_image
|
||||
cpu = 256
|
||||
memory = 512
|
||||
cpu = var.task_size.cpu
|
||||
memory = var.task_size.memory
|
||||
mountPoints = []
|
||||
volumesFrom = []
|
||||
essential = true
|
||||
|
||||
@@ -4,6 +4,18 @@ variable "customer_prefix" {
|
||||
default = "fleet"
|
||||
}
|
||||
|
||||
variable "task_size" {
|
||||
type = object({
|
||||
cpu = optional(number, 256)
|
||||
memory = optional(number, 1024)
|
||||
})
|
||||
|
||||
default = {
|
||||
cpu = 256
|
||||
memory = 1024
|
||||
}
|
||||
}
|
||||
|
||||
variable "ecs_cluster" {
|
||||
type = string
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user