Skip to content

Commit

Permalink
Add ulimits (#22)
Browse files Browse the repository at this point in the history
* Add ulimits to container definition

* Build readme
  • Loading branch information
jfharden authored and aknysh committed Mar 14, 2019
1 parent 1e0a6da commit 0e62c85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Available targets:
help Help screen
help/all Display help for all targets
help/short This help short screen
lint: Lint terraform code
lint Lint terraform code
```
## Inputs
Expand All @@ -89,6 +89,7 @@ Available targets:
| port_mappings | The port mappings to configure for the container. This is a list of maps. Each map should contain "containerPort", "hostPort", and "protocol", where "protocol" is one of "tcp" or "udp". If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort | list | `<list>` | no |
| readonly_root_filesystem | Determines whether a container is given read-only access to its root filesystem. Due to how Terraform type casts booleans in json it is required to double quote this value | string | `false` | no |
| secrets | The secrets to pass to the container. This is a list of maps | list | `<list>` | no |
| ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" | list | `<list>` | no |
| working_directory | The working directory to run commands inside the container | string | `` | no |

## Outputs
Expand Down
2 changes: 1 addition & 1 deletion docs/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Available targets:
help Help screen
help/all Display help for all targets
help/short This help short screen
lint: Lint terraform code
lint Lint terraform code
```
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
| port_mappings | The port mappings to configure for the container. This is a list of maps. Each map should contain "containerPort", "hostPort", and "protocol", where "protocol" is one of "tcp" or "udp". If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort | list | `<list>` | no |
| readonly_root_filesystem | Determines whether a container is given read-only access to its root filesystem. Due to how Terraform type casts booleans in json it is required to double quote this value | string | `false` | no |
| secrets | The secrets to pass to the container. This is a list of maps | list | `<list>` | no |
| ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" | list | `<list>` | no |
| working_directory | The working directory to run commands inside the container | string | `` | no |

## Outputs
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ locals {
readonlyRootFilesystem = "${var.readonly_root_filesystem}"
mountPoints = "${var.mount_points}"
dnsServers = "${var.dns_servers}"
ulimits = "${var.ulimits}"

portMappings = "${var.port_mappings}"

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,9 @@ variable "dns_servers" {
description = "Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers."
default = []
}

variable "ulimits" {
type = "list"
description = "Container ulimit settings. This is a list of maps, where each map should contain \"name\", \"hardLimit\" and \"softLimit\""
default = []
}

0 comments on commit 0e62c85

Please sign in to comment.