Skip to content

Commit a0d159c

Browse files
committed
adding missing option - firelensConfiguration
1 parent 5583aeb commit a0d159c

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Invoking the commands defined below creates an ECS task definition with the foll
8181
"links": null,
8282
"linuxParameters": null,
8383
"logConfiguration": null,
84+
"firelensConfiguration": null,
8485
"memory": 512,
8586
"memoryReservation": null,
8687
"mountPoints": null,
@@ -138,6 +139,7 @@ By default, this module creates a task definition with a single container defini
138139
| links | The link parameter allows containers to communicate with each other without the need for port mappings | `list(string)` | `[]` | no |
139140
| linuxParameters | Linux-specific modifications that are applied to the container, such as Linux KernelCapabilities | `any` | `{}` | no |
140141
| logConfiguration | The log configuration specification for the container | `any` | `{}` | no |
142+
| firelensConfiguration | The FireLens configuration for the container | `any` | `{}` | no |
141143
| memory | The hard limit (in MiB) of memory to present to the container | `number` | `0` | no |
142144
| memoryReservation | The soft limit (in MiB) of memory to reserve for the container | `number` | `0` | no |
143145
| mountPoints | The mount points for data volumes in your container | `list(any)` | `[]` | no |

main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ locals {
5353
"$1",
5454
)
5555

56-
logConfiguration = jsonencode(var.logConfiguration)
56+
logConfiguration = jsonencode(var.logConfiguration)
57+
firelensConfiguration = jsonencode(var.firelensConfiguration)
5758

5859
mountPoints = replace(
5960
replace(jsonencode(var.mountPoints), "/\"1\"/", "true"),
@@ -109,6 +110,7 @@ data "template_file" "container_definition" {
109110
links = local.links == "[]" ? "null" : local.links
110111
linuxParameters = local.linuxParameters == "{}" ? "null" : local.linuxParameters
111112
logConfiguration = local.logConfiguration == "{}" ? "null" : local.logConfiguration
113+
firelensConfiguration = local.firelensConfiguration == "{}" ? "null" : local.firelensConfiguration
112114
memory = var.memory == 0 ? "null" : var.memory
113115
memoryReservation = var.memoryReservation == 0 ? "null" : var.memoryReservation
114116
mountPoints = local.mountPoints == "[]" ? "null" : local.mountPoints

templates/container-definition.json.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"links": ${links},
1818
"linuxParameters": ${linuxParameters},
1919
"logConfiguration": ${logConfiguration},
20+
"firelensConfiguration": ${firelensConfiguration},
2021
"memory": ${memory},
2122
"memoryReservation": ${memoryReservation},
2223
"mountPoints": ${mountPoints},

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ variable "logConfiguration" {
122122
type = any
123123
}
124124

125+
variable "firelensConfiguration" {
126+
default = {}
127+
description = "The FireLens configuration for the container"
128+
type = any
129+
}
130+
125131
variable "memory" {
126132
default = 512
127133
description = "The hard limit (in MiB) of memory to present to the container"

0 commit comments

Comments
 (0)