Skip to content

Commit 65873d0

Browse files
authored
Add readonlyRootFilesystem to container_definition (#64)
Add readonlyRootFilesystem Co-authored-by: Maor Davidov <[email protected]>
1 parent 2d3a019 commit 65873d0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ resource "aws_ecs_task_definition" "task" {
256256
"pseudoTerminal": ${var.task_pseudo_terminal},
257257
%{~endif}
258258
"environment": ${jsonencode(local.task_environment)},
259-
"environmentFiles": ${jsonencode(local.task_environment_files)}
259+
"environmentFiles": ${jsonencode(local.task_environment_files)},
260+
"readonlyRootFilesystem": ${var.readonlyRootFilesystem ? true : false}
260261
}]
261262
EOF
262263

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,8 @@ variable "cpu_architecture" {
333333
default = "X86_64"
334334
type = string
335335
}
336+
337+
variable "readonlyRootFilesystem" {
338+
default = false
339+
description = "When this parameter is true, the container is given read-only access to its root file system"
340+
}

0 commit comments

Comments
 (0)