terraform-aws-ecs-container-definition

Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource

APACHE-2.0 License

Stars
339
Committers
52

Bot releases are hidden (Show)

terraform-aws-ecs-container-definition - 0.24.0 Add `environmentFiles` parameter

Published by aknysh over 4 years ago

what

  • Add the new environmentFiles parameter to the container definition

why

  • AWS announced that ECS supports environment files for the EC2 launch type

references

terraform-aws-ecs-container-definition - 0.23.0 Add support for linuxParameters

Published by aknysh almost 5 years ago

what

  • Add support for linuxParameters

why

  • linuxParameters are Linux-specific modifications that are applied to the container, such as Linux kernel capabilities

references

terraform-aws-ecs-container-definition - 0.22.0 Fix container_depends_on regression

Published by aknysh almost 5 years ago

what

  • Fix container_depends_on regression

why

  • Update type for container_depends_on to support newer capabilities as specified here. The dependsOn attribute is now an array of ContainerDependency objects.
terraform-aws-ecs-container-definition - 0.21.0 Simplify code using TF 0.12 first-class types and syntax. Sort provided ENV vars. Add missing parameters

Published by aknysh almost 5 years ago

what

  • Simplify code using TF 0.12 first-class types and syntax
  • Sort provided ENV vars
  • Add missing parameters

why

  • No need to convert all falsy values into null and un-quote booleans and numbers since TF 0.12 has first class types for bool, number and object that can be converted directly to JSON, as well as null value which is supported in JSON. So this is not needed:
# The following hacks are required to overcome TF automatic type conversions which lead to issues with the resulting json types.
# Conversion happens by using the built-in `replace` function in this order:
#  - Convert `""`, `{}`, `[]`, and `[""]` to `null`
#  - Convert `"true"` and `"false"` to `true` and `false`
#  - Convert quoted numbers (e.g. `"123"`) to `123`.
  • Sort provided ENV vars so terraform will not attempt to recreate on each plan/apply

related

  • Closes #40
  • Closes #20
  • Closes #33
  • Closes #41

test

  • terraform apply on examples/complete produces a valid JSON with sorted ENV vars containing names and values as strings (as required by ECS)
json_map = {"command":null,"cpu":256,"dependsOn":null,"dnsServers":null,"dockerLabels":null,"entryPoint":null,"environment":[{"name":"false_boolean_var","value":"false"},{"name":"integer_var","value":"42"},{"name":"string_var","value":"I am a string"},{"name":"true_boolean_var","value":"true"}],"essential":true,"firelensConfiguration":null,"healthCheck":null,"image":"cloudposse/geodesic","links":null,"logConfiguration":{"logDriver":"json-file","options":{"max-file":"3","max-size":"10m"},"secretOptions":null},"memory":256,"memoryReservation":128,"mountPoints":null,"name":"app","portMappings":[{"containerPort":8080,"hostPort":80,"protocol":"tcp"},{"containerPort":8081,"hostPort":443,"protocol":"udp"}],"privileged":null,"readonlyRootFilesystem":false,"repositoryCredentials":null,"secrets":null,"stopTimeout":30,"systemControls":null,"ulimits":null,"user":null,"volumesFrom":null,"workingDirectory":null}
terraform-aws-ecs-container-definition - 0.20.0 Convert to TF 0.12. Add tests. Add Codefresh test pipeline

Published by aknysh almost 5 years ago

what

  • Port module to Terraform 0.12
  • Pin all providers
  • Add example for testing
  • Add bats and terratest for the example
  • Add Codefresh badge to point to the test pipeline in terraform-modules project
  • Update README

why

  • Module currently does not work with 0.12. Much easier syntax
  • Better regression control
  • Automatically test the example on every commit and pull request
  • Provision resources on AWS in the test account and check the outputs for the correct values
  • terraform-modules project contains pipelines for all terraform modules
terraform-aws-ecs-container-definition - 0.19.0 Add support for systemControls

Published by aknysh almost 5 years ago

what

  • Add support for systemControls

why

  • Supported by ECS container definition
terraform-aws-ecs-container-definition - 0.18.0 Add `firelensConfiguration`

Published by aknysh almost 5 years ago

what

  • Add firelensConfiguration

why

  • To specify and configure a log router for container logs

references

terraform-aws-ecs-container-definition - 0.17.0 Add docker labels

Published by aknysh almost 5 years ago

what

  • Add docker labels

why

  • Add docker labels to the container definition
terraform-aws-ecs-container-definition - 0.16.0 Add privileged parameter

Published by aknysh almost 5 years ago

what

  • Add privileged parameter

why

  • To allow containers to be given elevated privileges on the host container instance. The default value is "" rather than "false" so that it becomes "privileged": null in the JSON output. This is because this parameter is not supported for Windows containers or tasks using the Fargate launch type.
terraform-aws-ecs-container-definition -

Published by goruha over 5 years ago

terraform-aws-ecs-container-definition - 0.14.0 Add support for `stopTimeout` in container definition

Published by aknysh over 5 years ago

what

  • Add support for stopTimeout in container definition

why

  • To specify timeout in seconds between sending SIGTERM and SIGKILL to container
terraform-aws-ecs-container-definition - 0.13.0 Add support for `dependsOn` parameter

Published by aknysh over 5 years ago

what

  • Add support for dependsOn parameter

why

  • New parameter supported by AWS

references

terraform-aws-ecs-container-definition - 0.12.0 Add user, fix negative numbers

Published by aknysh over 5 years ago

what

  • Add user parameter
  • Fix negative numbers

why

  • Add user variable - the user to run as inside the container
  • Fix the conversion of quoted negative numbers ("-1") to numbers (-1)
terraform-aws-ecs-container-definition - 0.11.0 Support optional container_cpu, container_memory and container_memory_reservation

Published by aknysh over 5 years ago

what

  • Support optional container_cpu, container_memory and container_memory_reservation

why

  • These 3 fields could be optional when using Fargate type.
    However, the current module does not allow the caller to remove these fields from the container definition.
    AWS will fail the definition if we set to 0 directly. We replace 0 to null for these 3 fields so terraform apply could work
terraform-aws-ecs-container-definition - 0.10.0 Add volumes_from and links

Published by aknysh over 5 years ago

what

  • Add volumes_from and links

why

terraform-aws-ecs-container-definition - 0.9.1 Fix the value of `second_container_json` in the example

Published by aknysh over 5 years ago

what

  • Fix the value of second_container_json in the example

why

  • Typo
terraform-aws-ecs-container-definition - 0.9.0 Support private repositories

Published by aknysh over 5 years ago

what

  • Added repository_credentials, a map which corresponds to the repositoryCredentials JSON key

why

  • Support private repositories
  • Closes #19
terraform-aws-ecs-container-definition - 0.8.0 Add ulimits to container definition

Published by aknysh over 5 years ago

what

  • Add ulimits to container definition

why

  • The ulimits set constraints on how many resources a container can consume so that it doesn't deplete all available resources on the host

references

terraform-aws-ecs-container-definition - 0.7.0 Add `dnsServers` entry to container definition

Published by aknysh almost 6 years ago

what

  • Add dnsServers entry to container definition

why

  • Missing
terraform-aws-ecs-container-definition -

Published by osterman almost 6 years ago