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

Added parameter to enable readonlyrootfilesystem #55

Merged
merged 2 commits into from
Dec 5, 2024
Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ In addition you have the option to create or not :
| platform\_version | The platform version on which to run your service. Only applicable for launch\_type set to FARGATE. Defaults to LATEST. | `string` | `"LATEST"` | no |
| port | Port for target group to listen | `number` | `80` | no |
| protocol | Protocol to use (HTTP or HTTPS) | `string` | `"HTTP"` | no |
| readonlyrootfilesystem | Enable ready only access to root File ssystem. | `bool` | `false` | no |
| redirects | Map of path redirects to add to the listener | `map` | `{}` | no |
| schedule\_cron\_start | Cron expression to define when to trigger a start of the auto-scaling group. E.g. 'cron(00 21 ? \* SUN-THU \*)' to start at 8am UTC time. | `string` | `""` | no |
| schedule\_cron\_stop | Cron expression to define when to trigger a stop of the auto-scaling group. E.g. 'cron(00 09 ? \* MON-FRI \*)' to start at 8am UTC time | `string` | `""` | no |
Expand Down
5 changes: 5 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -503,3 +503,8 @@ variable "task_role_policies" {
description = "Custom policies to be added on the task role."
}

variable "readonlyrootfilesystem" {
type = bool
default = false
description = "Enable ready only access to root File ssystem."
}
2 changes: 2 additions & 0 deletions ecs-task-definition.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resource "aws_ecs_task_definition" "default" {
memory = var.memory
essential = true
command = var.command
readonlyRootFilesystem = var.readonlyrootfilesystem
portMappings = [
{
containerPort = var.container_port
Expand All @@ -40,6 +41,7 @@ resource "aws_ecs_task_definition" "default" {
secrets = [for k, v in var.ssm_variables : { name : k, valueFrom : v }]
environment = [for k, v in var.static_variables : { name : k, value : v }]
ulimits = var.ulimits

}
])

Expand Down