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.
Terraform 0.12. Pin module version to ~> v2.0
. Submit pull-requests to master
branch.
Terraform 0.11. Pin module version to ~> v1.0
. Submit pull-requests to terraform011
branch.
module "ecs" {
source = "terraform-aws-modules/ecs/aws"
name = "my-ecs"
}
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"
version = "~> 2.0"
create_ecs = false
# ... omitted
}
No requirements.
Name | Version |
---|---|
aws | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
container_insights | Controls if ECS Cluster has container insights enabled | bool |
false |
no |
create_ecs | Controls if ECS should be created | bool |
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(string) |
{} |
no |
Name | Description |
---|---|
this_ecs_cluster_arn | n/a |
this_ecs_cluster_id | n/a |
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.