Skip to content

Commit

Permalink
Add dnsServers entry to container definition (#17)
Browse files Browse the repository at this point in the history
* Add dnsServers entry to container definition

* update readme file with new input

* generated readme files
  • Loading branch information
sweeneypng authored and aknysh committed Jan 5, 2019
1 parent cb1f43d commit 1e0a6da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ 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

| Name | Description | Type | Default | Required |
Expand All @@ -79,6 +78,7 @@ Available targets:
| container_memory | The amount of memory (in MiB) to allow the container to use. This is a hard limit, if the container attempts to exceed the container_memory, the container is killed. This field is optional for Fargate launch type and the total amount of container_memory of all containers in a task will need to be lower than the task memory value | string | `256` | no |
| container_memory_reservation | The amount of memory (in MiB) to reserve for the container. If container needs to exceed this threshold, it can do so up to the set container_memory hard limit | string | `128` | no |
| container_name | The name of the container. Up to 255 characters ([a-z], [A-Z], [0-9], -, _ allowed) | string | - | yes |
| dns_servers | Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers. | list | `<list>` | no |
| entrypoint | The entry point that is passed to the container | list | `<list>` | no |
| environment | The environment variables to pass to the container. This is a list of maps | list | `<list>` | no |
| essential | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value | string | `true` | no |
Expand Down Expand Up @@ -186,7 +186,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

## Copyright

Copyright © 2017-2018 [Cloud Posse, LLC](https://cpco.io/copyright)
Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)



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
```
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

## Inputs

| Name | Description | Type | Default | Required |
Expand All @@ -9,6 +8,7 @@
| container_memory | The amount of memory (in MiB) to allow the container to use. This is a hard limit, if the container attempts to exceed the container_memory, the container is killed. This field is optional for Fargate launch type and the total amount of container_memory of all containers in a task will need to be lower than the task memory value | string | `256` | no |
| container_memory_reservation | The amount of memory (in MiB) to reserve for the container. If container needs to exceed this threshold, it can do so up to the set container_memory hard limit | string | `128` | no |
| container_name | The name of the container. Up to 255 characters ([a-z], [A-Z], [0-9], -, _ allowed) | string | - | yes |
| dns_servers | Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers. | list | `<list>` | no |
| entrypoint | The entry point that is passed to the container | list | `<list>` | no |
| environment | The environment variables to pass to the container. This is a list of maps | list | `<list>` | no |
| essential | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value | string | `true` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ locals {
workingDirectory = "${var.working_directory}"
readonlyRootFilesystem = "${var.readonly_root_filesystem}"
mountPoints = "${var.mount_points}"
dnsServers = "${var.dns_servers}"

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 @@ -113,3 +113,9 @@ variable "mount_points" {
# }
#]
}

variable "dns_servers" {
type = "list"
description = "Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers."
default = []
}

0 comments on commit 1e0a6da

Please sign in to comment.