Skip to content
Terraform module which creates AWS ECS resources
Branch: master
Clone or download
Latest commit e735488 Mar 8, 2019
Permalink
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
.gitignore
.pre-commit-config.yaml
README.md
main.tf Add tag support for ECS module Mar 8, 2019
outputs.tf
variables.tf

README.md

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.

Usage

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
}

Examples

Inputs

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

Outputs

Name Description
this_ecs_cluster_arn
this_ecs_cluster_id
this_ecs_cluster_name The name of the ECS cluster

Authors

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

License

Apache 2 Licensed. See LICENSE for full details.

You can’t perform that action at this time.