Skip to content

fix: update type of logConfiguration variable #27

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

Merged
merged 1 commit into from
Mar 21, 2020
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
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