Skip to content

Commit d9c91f4

Browse files
ericpaulsenbpmct
andauthored
set CPU & memory vars
Co-authored-by: Ben Potter <ben@coder.com>
1 parent 70f9537 commit d9c91f4

File tree

1 file changed

+9
-2
lines changed
  • examples/templates/ecs-container

1 file changed

+9
-2
lines changed

examples/templates/ecs-container/main.tf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ variable "ecs-cluster" {
1515
description = "Input the ECS cluster ARN to host the workspace"
1616
default = ""
1717
}
18+
variable "cpu" {
19+
default = "1024"
20+
}
21+
22+
variable "memory" {
23+
default = "2048"
24+
}
1825

1926
# configure AWS provider with creds present on Coder server host
2027
provider "aws" {
@@ -27,8 +34,8 @@ resource "aws_ecs_task_definition" "workspace" {
2734
family = "coder"
2835

2936
requires_compatibilities = ["EC2"]
30-
cpu = 1024
31-
memory = 2048
37+
cpu = var.cpu
38+
memory = var.memory
3239
container_definitions = jsonencode([
3340
{
3441
name = "coder-workspace-${data.coder_workspace.me.id}"

0 commit comments

Comments
 (0)