Skip to content

Commit

Permalink
fix: update type of logConfiguration variable (#27)
Browse files Browse the repository at this point in the history
Fixes #26
  • Loading branch information
jasonwalsh authored Mar 21, 2020
1 parent d83e813 commit 041b144
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ By default, this module creates a task definition with a single container defini
| ipc\_mode | The IPC resource namespace to use for the containers in the task | `string` | `"host"` | no |
| links | The link parameter allows containers to communicate with each other without the need for port mappings | `list(string)` | `[]` | no |
| linuxParameters | Linux-specific modifications that are applied to the container, such as Linux KernelCapabilities | `any` | `{}` | no |
| logConfiguration | The log configuration specification for the container | `map(string)` | `{}` | no |
| logConfiguration | The log configuration specification for the container | `any` | `{}` | no |
| memory | The hard limit (in MiB) of memory to present to the container | `number` | `0` | no |
| memoryReservation | The soft limit (in MiB) of memory to reserve for the container | `number` | `0` | no |
| mountPoints | The mount points for data volumes in your container | `list(any)` | `[]` | no |
Expand Down
11 changes: 10 additions & 1 deletion examples/terraform-task-definition-multiple-containers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ module "redis" {
family = "redis"
image = "redis:alpine"
memory = 512
name = "redis"

logConfiguration = {
logDriver = "awslogs"
options = {
awslogs-group = "awslogs-mongodb"
awslogs-region = "us-east-1"
}
}

name = "redis"

portMappings = [
{
Expand Down
8 changes: 7 additions & 1 deletion test/fixtures/multiple.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@
"interactive": false,
"links": null,
"linuxParameters": null,
"logConfiguration": null,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "awslogs-mongodb",
"awslogs-region": "us-east-1"
}
},
"memory": 512,
"memoryReservation": null,
"mountPoints": null,
Expand Down
8 changes: 7 additions & 1 deletion test/fixtures/single.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@
}
]
},
"logConfiguration": null,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "awslogs-mongodb",
"awslogs-region": "us-east-1"
}
},
"memory": null,
"memoryReservation": 512,
"mountPoints": [
Expand Down
8 changes: 8 additions & 0 deletions varfile.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ linuxParameters = {
]
}

logConfiguration = {
logDriver = "awslogs"
options = {
awslogs-group = "awslogs-mongodb"
awslogs-region = "us-east-1"
}
}

memoryReservation = 512

mountPoints = [
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ variable "linuxParameters" {
variable "logConfiguration" {
default = {}
description = "The log configuration specification for the container"
type = map(string)
type = any
}

variable "memory" {
Expand Down

0 comments on commit 041b144

Please sign in to comment.