terraform-aws-ecs-alb-service-task

Terraform module which implements an ECS service which exposes a web service via ALB.

APACHE-2.0 License

Stars
146
Committers
55

Bot releases are visible (Hide)

terraform-aws-ecs-alb-service-task - 0.17.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

related

  • Closes #33
  • Closes #22
  • Cloes #30

test

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

container_definition_json = [{"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":null,"memory":256,"memoryReservation":128,"mountPoints":null,"name":"geodesic","portMappings":[{"containerPort":80,"hostPort":80,"protocol":"tcp"},{"containerPort":443,"hostPort":443,"protocol":"udp"}],"privileged":null,"readonlyRootFilesystem":false,"repositoryCredentials":null,"secrets":null,"startTimeout":30,"stopTimeout":30,"systemControls":null,"ulimits":null,"user":null,"volumesFrom":null,"workingDirectory":null}]

container_definition_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":null,"memory":256,"memoryReservation":128,"mountPoints":null,"name":"geodesic","portMappings":[{"containerPort":80,"hostPort":80,"protocol":"tcp"},{"containerPort":443,"hostPort":443,"protocol":"udp"}],"privileged":null,"readonlyRootFilesystem":false,"repositoryCredentials":null,"secrets":null,"startTimeout":30,"stopTimeout":30,"systemControls":null,"ulimits":null,"user":null,"volumesFrom":null,"workingDirectory":null}

ecs_cluster_arn = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-alb-service-task
ecs_cluster_id = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-alb-service-task
ecs_exec_role_policy_id = eg-test-ecs-alb-service-task-exec:eg-test-ecs-alb-service-task-exec
ecs_exec_role_policy_name = eg-test-ecs-alb-service-task-exec

private_subnet_cidrs = [
  "172.16.0.0/19",
  "172.16.32.0/19",
]

public_subnet_cidrs = [
  "172.16.96.0/19",
  "172.16.128.0/19",
]

service_name = eg-test-ecs-alb-service-task
service_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-alb-service-task-service
service_security_group_id = sg-00c87f151c0393e7d
task_definition_family = eg-test-ecs-alb-service-task
task_definition_revision = 1
task_exec_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-alb-service-task-exec
task_exec_role_name = eg-test-ecs-alb-service-task-exec
task_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-alb-service-task-task
task_role_id = AROAR24IM5RYQGCHM4V3M
task_role_name = eg-test-ecs-alb-service-task-task
vpc_cidr = 172.16.0.0/16
terraform-aws-ecs-alb-service-task - 0.16.0 Add support for multiple load_balancer configs

Published by aknysh about 5 years ago

what

  • Add support for multiple load_balancer configs

why

  • As of AWS provider 2.22, multiple load_balancer configs are supported

references

terraform-aws-ecs-alb-service-task - 0.15.0 Add optional "propagate_tags" variable

Published by aknysh about 5 years ago

what

  • Add optional "propagate_tags" variable

why

  • Variable allows to set optional "propagate_tags" argument on "aws_ecs_service" resource
terraform-aws-ecs-alb-service-task -

Published by goruha about 5 years ago

terraform-aws-ecs-alb-service-task -

Published by osterman over 5 years ago

terraform-aws-ecs-alb-service-task - 0.13.0 Add `deployment_controller` option

Published by aknysh over 5 years ago

what

  • Add deployment_controller option

why

  • ECS Service supports a deployment_controller to enable support for CodeDeploy integration. This further enables the ability to use Blue/Green deployments via CodeDeploy
terraform-aws-ecs-alb-service-task -

Published by osterman over 5 years ago

terraform-aws-ecs-alb-service-task - 0.11.0 Allow configuration of auto assign public IP

Published by aknysh over 5 years ago

what

  • Allow configuration of auto assign public IP

why

  • Add assign_public_ip variable
  • Rename variable private_subnet_ids to subnet_ids because it was misleading - public subnet ids can also be set

references

terraform-aws-ecs-alb-service-task - 0.10.0 Fix name for `aws_security_group` for `ecs_service`

Published by aknysh over 5 years ago

what

  • Fix name for "aws_security_group" "ecs_service"

why

  • Wrong label was used for name in "aws_security_group" "ecs_service". Since the default label was used without any additional attributes to disambiguate the names, when deploying the cluster, there were errors that a Security Group with the same name already existed. For the Security Group for the ECS service, should use the service_label
terraform-aws-ecs-alb-service-task - 0.9.0 Add task definition family and revision to module outputs

Published by aknysh over 5 years ago

what

  • Add task definition family and revision to module outputs

why

  • The outputs can be used in other modules
terraform-aws-ecs-alb-service-task - 0.8.0 Make volumes configurable

Published by aknysh over 5 years ago

what

  • Make volumes configurable

why

Allows to add volume definitions to task like this

module "alb_service_task" {
  source                    = "../terraform-aws-ecs-alb-service-task"
  volumes = [
    {
      name = "${module.label_base.id}-data"
      docker_volume_configuration = [
        {
          scope         = "shared"
          autoprovision = true
        },
      ]
    },
  ]
}
terraform-aws-ecs-alb-service-task -

Published by osterman over 5 years ago

terraform-aws-ecs-alb-service-task - 0.6.3

Published by joshmyers almost 6 years ago

terraform-aws-ecs-alb-service-task - 0.6.2 Enable resource tagging for all resources

Published by aknysh almost 6 years ago

what

  • Enable resource tagging for all resources

why

  • Resource tags are uniform across all resources provisioned by this module
  • More accurate observability when creating a resource group for said resources
terraform-aws-ecs-alb-service-task - 0.6.1

Published by aknysh about 6 years ago

what

  • Remove unused vars
  • Update README with examples and descriptions
  • Add usage example

why

  • The vars were declared but never used and they are unnecessary
  • Add example for specifying container definition
terraform-aws-ecs-alb-service-task -

Published by osterman about 6 years ago

terraform-aws-ecs-alb-service-task -

Published by sarkis about 6 years ago

terraform-aws-ecs-alb-service-task - Regenerate README.md

Published by vadim-hleif about 6 years ago

what

  • Regenerate README.md

why

  • Previous version of build-harness has some typos
terraform-aws-ecs-alb-service-task - 0.4.0: Remove healthcheck parameter from resource which does not support it

Published by sarkis about 6 years ago

terraform-aws-ecs-alb-service-task -

Published by sarkis over 6 years ago