Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hennge/terraform-aws-ecs

Terraform module which creates ECS (EC2 and Fargate) and related resources (autoscaling, cron fargate, etc.) on AWS
https://github.com/hennge/terraform-aws-ecs

aws ecs terraform terraform-module terraform-modules

Last synced: 9 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# AWS Elastic Container Service (ECS) Terraform module

Terraform module which creates ECS resources on AWS.

These types of resources are supported:

* [ECS Cluster](https://github.com/HENNGE/terraform-aws-ecs)
* [ECS Service](https://github.com/HENNGE/terraform-aws-ecs/tree/main/modules/core/service)
* [ECS Task Definition](https://github.com/HENNGE/terraform-aws-ecs/tree/main/modules/core/task)
* [ECS Autoscaling](https://github.com/HENNGE/terraform-aws-ecs/tree/main/modules/autoscaling)

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

```hcl
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](#requirement\_terraform) | >= 1.0 |
| [aws](#requirement\_aws) | >= 3.74.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 3.74.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_ecs_cluster.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster) | resource |
| [aws_ecs_cluster_capacity_providers.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster_capacity_providers) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [capacity\_providers](#input\_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](#input\_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](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster#default_capacity_provider_strategy) | `list(any)` | `[]` | no |
| [enable\_container\_insights](#input\_enable\_container\_insights) | Enable container insights. | `bool` | `false` | no |
| [execute\_command\_configuration](#input\_execute\_command\_configuration) | Map with execute command configuration. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster#execute_command_configuration) | `any` | `null` | no |
| [name](#input\_name) | Cluster name. | `string` | n/a | yes |
| [settings](#input\_settings) | List of maps with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster#setting) | `list(any)` | `[]` | no |
| [tags](#input\_tags) | Key-value mapping of resource tags. | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [arn](#output\_arn) | ARN of the generated cluster |
| [name](#output\_name) | Name of the Cluster |

## Authors

Module managed by [HENNGE](https://github.com/HENNGE).

## License

Apache 2 Licensed. See LICENSE for full details.