Skip to content

rabiloo/terraform-aws-ecs

Repository files navigation

AWS ECS Terraform module

Terraform module which creates ECS cluster resources on AWS.

Usage

module "php" {
  source  = "rabiloo/ecs/aws"
  version = "~>0.2.3"

  name = "app-ecs-cluster"
  capacity_providers = ["FARGATE", "FARGATE_SPOT"]
  default_capacity_provider_strategy = [
    { capacity_provider = "FARGATE" },
  ]
  tags = {
    Owner       = "user"
    Service     = "app-name"
  }
}

Requirements

Name Version
terraform >=1.2
aws >=4.0

Providers

Name Version
aws 5.1.0

Modules

No modules.

Resources

Name Type
aws_ecs_cluster.this resource
aws_ecs_cluster_capacity_providers.this resource

Inputs

Name Description Type Default Required
name Name of the ECS cluster string n/a yes
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
default_capacity_provider_strategy The capacity provider strategy to use by default for the cluster. Can be one or more. list(map(any)) [] no
tags A map of tags to add to ECS Cluster resource map(string) {} no

Outputs

Name Description
ecs_cluster_arn The ARN of the ECS Cluster
ecs_cluster_id The ID of the ECS Cluster
ecs_cluster_name The name of the ECS cluster

Development

  1. Install terrform, tflint, terraform-docs and make
  2. Using make
make help

Contributing

All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a feature branch, and send a pull request.

If you would like to help take a look at the list of issues.

License

This project is released under the MIT License.
Copyright © 2023 Rabiloo Co., Ltd
Please see License File for more information.