Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow task defs to be used for fargate #34

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ resource "aws_ecs_task_definition" "ecs_task_definition" {
ipc_mode = var.ipc_mode
network_mode = var.network_mode
pid_mode = var.pid_mode

# Fargate requires cpu and memory to be defined at the task level
cpu = var.cpu == 0 ? "null" : var.cpu
memory = var.memory == 0 ? "null" : var.memory

dynamic "placement_constraints" {
for_each = var.placement_constraints
content {
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ variable "interactive" {
}

variable "ipc_mode" {
default = "host"
default = null
description = "The IPC resource namespace to use for the containers in the task"
}

Expand Down Expand Up @@ -144,7 +144,7 @@ variable "network_mode" {
}

variable "pid_mode" {
default = "host"
default = null
description = "The process namespace to use for the containers in the task"
}

Expand Down