Skip to content

Terraform module which creates ECS (EC2 and Fargate) and related resources (autoscaling, cron fargate, etc.) on AWS

License

Notifications You must be signed in to change notification settings

HENNGE/terraform-aws-ecs

Repository files navigation

AWS Elastic Container Service (ECS) Terraform module

Terraform module which creates ECS resources on AWS.

These types of resources are supported:

The root module (this) only creates ecs_cluster, to create other resources, please instantiate the submodules.

Terraform versions

Supports only Terraform ~> 0.12.

Requires Terraform AWS Provider version >=2.42.0 for Capacity Provider options.

Usage

module "ecs_cluster" {
  source  = "HENNGE/ecs/aws"
  version = "1.0.0"

  name = "${local.prefix}-cluster"
}

Examples

See examples folder for usage guide.

Versioning

This module uses Semver.

x.y.z

x shall change when there's major language or breaking feature change (e.g. 0.11 to 0.12 which drastically change the language)

y shall change when there's feature addition which is not breaking existing API (e.g. addition of some parameters with default value)

z shall change when there's documentation updates, minor fixes, etc.

Requirements

Name Version
terraform >= 1.0
aws >= 3.74.0

Providers

Name Version
aws >= 3.74.0

Modules

No modules.

Resources

Name Type
aws_ecs_cluster.main resource
aws_ecs_cluster_capacity_providers.main resource

Inputs

Name Description Type Default Required
capacity_providers List of short names or full Amazon Resource Names (ARNs) of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT. list(string) null no
default_capacity_provider_strategy The capacity provider strategy to use by default for the cluster. Can be one or more. List of map with corresponding items in docs. Terraform Docs list(any) [] no
enable_container_insights Enable container insights. bool false no
execute_command_configuration Map with execute command configuration. Terraform Docs any null no
name Cluster name. string n/a yes
settings List of maps with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Terraform Docs list(any) [] no
tags Key-value mapping of resource tags. map(string) {} no

Outputs

Name Description
arn ARN of the generated cluster
name Name of the Cluster

Authors

Module managed by HENNGE.

License

Apache 2 Licensed. See LICENSE for full details.