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.
Reasoining. Due to fact, that base mobule was rewrited due, seems a bit clunky and it does solve some owner specific issue.
IMPORTANT: The master branch is used in source just as an example. In your code, do not pin to master because there may be breaking changes between releases. Instead pin to the release tag (e.g. ?ref=tags/x.y.z) of one of our latest releases.
module "ecs" {
source = "terraform-aws-module/ecs/aws"
name = "my-ecs"
container_insights = true
capacity_providers = ["FARGATE", "FARGATE_SPOT"]
default_capacity_provider_strategy = [
{
capacity_provider = "FARGATE_SPOT"
}
]
tags = {
Environment = "Development"
}
}
See examples
directory for working examples to reference
Name | Version |
---|---|
terraform | >= 1 |
aws | >= 4 |
Name | Version |
---|---|
aws | >= 4 |
No modules.
Name | Type |
---|---|
aws_ecs_cluster.this | resource |
aws_ecs_cluster_capacity_providers.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
capacity_providers | List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT. | list(string) |
[] |
no |
container_insights | Controls if ECS Cluster has container insights enabled | bool |
false |
no |
create_ecs | Controls if ECS should be created | bool |
true |
no |
default_capacity_provider_strategy | The capacity provider strategy to use by default for the cluster. Can be one or more. | list(map(any)) |
[] |
no |
name | Name to be used on all the resources as identifier, also the name of the ECS cluster | string |
null |
no |
tags | A map of tags to add to ECS Cluster | map(string) |
{} |
no |
Name | Description |
---|---|
ecs_cluster_arn | ARN of the ECS Cluster |
ecs_cluster_id | ID of the ECS Cluster |
ecs_cluster_name | The name of the ECS cluster |
- 📝 Use a succinct title and description.
- 🐛 Bugs & feature requests can be be opened
- 📶 Support questions are better asked on Stack Overflow
- 😊 Be nice, civil and polite (as always).
Copyright 2019 Ivan Katliarhcuk
MIT Licensed. See LICENSE for full details.
Submit a pull request
Currently maintained by Ivan Katliarchuk and these awesome contributors.