Skip to content
Terraform module which creates AWS ECS resources
Branch: master
Clone or download
Latest commit e735488 Mar 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/complete-ecs Run pre-commit -a Jan 22, 2019
modules/ecs-instance-profile Use this_ in the outputs May 20, 2018
.pre-commit-config.yaml Add tag support for ECS module Mar 8, 2019

AWS Elastic Container Service (ECS) Terraform module

Terraform module which creates ECS resources on AWS.

This module focuses purely on ECS and nothing else. Therefore only these resources can be created with this module:

However, having said the above to have a proper ECS cluster up and running multiple resources are needed. In most cases creating these resources is heavily opinionated and or context-bound. That is why this module does not create these resources. But you still need them to have a production ready environment. Therefore the example area shows how to create everything needed for a production environment.


module "ecs" {
  source = "terraform-aws-modules/ecs/aws"

  name = "my-ecs"

Conditional creation

Sometimes you need to have a way to create ECS resources conditionally but Terraform does not allow to use count inside module block, so the solution is to specify argument create_ecs.

# ECS cluster will not be created
module "ecs" {
  source = "terraform-aws-modules/ecs/aws"

  create_ecs = false
  # ... omitted



Name Description Type Default Required
create_ecs Controls if ECS should be created string "true" no
name Name to be used on all the resources as identifier, also the name of the ECS cluster string n/a yes
tags A map of tags to add to ECS Cluster map <map> no


Name Description
this_ecs_cluster_name The name of the ECS cluster


Module managed by Armin Coralic, Anton Babenko and other awesome contributors.


Apache 2 Licensed. See LICENSE for full details.

You can’t perform that action at this time.