Skip to content

Commit

Permalink
Add readonlyRootFilesystem to container_definition (#64)
Browse files Browse the repository at this point in the history
Add readonlyRootFilesystem

Co-authored-by: Maor Davidov <[email protected]>
  • Loading branch information
maordavidov and maordavidov authored Jan 31, 2023
1 parent 2d3a019 commit 65873d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ resource "aws_ecs_task_definition" "task" {
"pseudoTerminal": ${var.task_pseudo_terminal},
%{~endif}
"environment": ${jsonencode(local.task_environment)},
"environmentFiles": ${jsonencode(local.task_environment_files)}
"environmentFiles": ${jsonencode(local.task_environment_files)},
"readonlyRootFilesystem": ${var.readonlyRootFilesystem ? true : false}
}]
EOF

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,8 @@ variable "cpu_architecture" {
default = "X86_64"
type = string
}

variable "readonlyRootFilesystem" {
default = false
description = "When this parameter is true, the container is given read-only access to its root file system"
}

0 comments on commit 65873d0

Please sign in to comment.