Skip to content

Commit

Permalink
Add ephemeral_storage (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulopontesm authored Oct 20, 2021
1 parent abc8a72 commit ce6fcd0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ resource "aws_ecs_task_definition" "task" {
memory = var.task_definition_memory
task_role_arn = aws_iam_role.task.arn

dynamic "ephemeral_storage" {
for_each = var.task_definition_ephemeral_storage == 0 ? [] : [var.task_definition_ephemeral_storage]
content {
size_in_gib = var.task_definition_ephemeral_storage
}
}

container_definitions = <<EOF
[{
"name": "${var.container_name != "" ? var.container_name : var.name_prefix}",
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ variable "task_definition_memory" {
type = number
}

variable "task_definition_ephemeral_storage" {
description = "The total amount, in GiB, of ephemeral storage to set for the task."
default = 0
type = number
}

variable "task_container_command" {
description = "The command that is passed to the container."
default = []
Expand Down

0 comments on commit ce6fcd0

Please sign in to comment.