diff --git a/README.md b/README.md index 40835ba..209a926 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ Available targets: | environment | The environment variables to pass to the container. This is a list of maps | 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 | | healthcheck | A map containing command (string), interval (duration in seconds), retries (1-10, number of times to retry before marking container unhealthy, and startPeriod (0-300, optional grace period to wait, in seconds, before failed healthchecks count toward retries) | map | `` | no | +| links | List of container names this container can communicate with without port mappings. | list | `` | no | | log_driver | The log driver to use for the container. If using Fargate launch type, only supported value is awslogs | string | `awslogs` | no | | log_options | The configuration options to send to the `log_driver` | map | `` | no | | mount_points | Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume` | list | `` | no | @@ -91,6 +92,7 @@ Available targets: | repository_credentials | Container repository credentials; required when using a private repo. This map currently supports a single key; "credentialsParameter", which should be the ARN of a Secrets Manager's secret holding the credentials | map | `` | no | | secrets | The secrets to pass to the container. This is a list of maps | list | `` | no | | ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" | list | `` | no | +| volumes_from | A list of VolumesFrom maps which contain "sourceContainer" (name of the container that has the volumes to mount) and "readOnly" (whether the container can write to the volume). | list | `` | no | | working_directory | The working directory to run commands inside the container | string | `` | no | ## Outputs diff --git a/docs/terraform.md b/docs/terraform.md index 9d195a0..4635d49 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -13,6 +13,7 @@ | environment | The environment variables to pass to the container. This is a list of maps | 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 | | healthcheck | A map containing command (string), interval (duration in seconds), retries (1-10, number of times to retry before marking container unhealthy, and startPeriod (0-300, optional grace period to wait, in seconds, before failed healthchecks count toward retries) | map | `` | no | +| links | List of container names this container can communicate with without port mappings. | list | `` | no | | log_driver | The log driver to use for the container. If using Fargate launch type, only supported value is awslogs | string | `awslogs` | no | | log_options | The configuration options to send to the `log_driver` | map | `` | no | | mount_points | Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume` | list | `` | no | @@ -21,6 +22,7 @@ | repository_credentials | Container repository credentials; required when using a private repo. This map currently supports a single key; "credentialsParameter", which should be the ARN of a Secrets Manager's secret holding the credentials | map | `` | no | | secrets | The secrets to pass to the container. This is a list of maps | list | `` | no | | ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" | list | `` | no | +| volumes_from | A list of VolumesFrom maps which contain "sourceContainer" (name of the container that has the volumes to mount) and "readOnly" (whether the container can write to the volume). | list | `` | no | | working_directory | The working directory to run commands inside the container | string | `` | no | ## Outputs diff --git a/main.tf b/main.tf index db55e1b..cc0305b 100644 --- a/main.tf +++ b/main.tf @@ -15,6 +15,8 @@ locals { dnsServers = "${var.dns_servers}" ulimits = "${var.ulimits}" repositoryCredentials = "${var.repository_credentials}" + links = "${var.links}" + volumesFrom = "${var.volumes_from}" portMappings = "${var.port_mappings}" diff --git a/variables.tf b/variables.tf index 3f39e12..9e492a6 100644 --- a/variables.tf +++ b/variables.tf @@ -131,3 +131,15 @@ variable "repository_credentials" { description = "Container repository credentials; required when using a private repo. This map currently supports a single key; \"credentialsParameter\", which should be the ARN of a Secrets Manager's secret holding the credentials" default = {} } + +variable "volumes_from" { + type = "list" + description = "A list of VolumesFrom maps which contain \"sourceContainer\" (name of the container that has the volumes to mount) and \"readOnly\" (whether the container can write to the volume)." + default = [] +} + +variable "links" { + type = "list" + description = "List of container names this container can communicate with without port mappings." + default = [] +}