Skip to content

Repository files navigation

AWS ECS Cluster

This module provision the whole ECS cluster. The resources involve are:

  • ECS Cluster
  • IAM Instance Profile
  • Launch Configuration
  • AutoScaling Group
  • ECS Capacity Provider

Getting Started

Setting up pre-commit

pre-commit is used for lint,validate, and formatting terrraform files as well as other utilities check such as secret detection before every commit.

To install:

  1. Run
brew tap liamg/tfsec
brew install pre-commit gawk terraform-docs tflint tfsec coreutils
  1. Run pre-commit install in this repository file directory:
pre-commit install

Documentation

Requirements

No requirements.

Providers

Name Version
aws 3.49.0

Modules

No modules.

Resources

Name Type
aws_autoscaling_group.app resource
aws_ecs_capacity_provider.default resource
aws_ecs_cluster.app resource
aws_iam_instance_profile.ecs resource
aws_launch_template.app resource
aws_ami.ecs_optimized data source
aws_iam_role.ecs_instance_role data source
aws_security_group.ecs_launch data source
aws_subnet_ids.private data source

Inputs

Name Description Type Default Required
desired_instance_capacity The desired capacity for your autoscaling group number 1 no
ecs_cluster_name The name for the ECS cluster. string n/a yes
ecs_security_group_id The ID of the security group use for ECS instances. string n/a yes
enable_container_insights To enable container insights which will cost you more money in AWS CloudWatch bool true no
environment The environment for the ECS cluster. string "stag" no
instance_type The instance type of EC2 instance to spin up in ECS. string "t3.micro" no
max_instance_capacity The maximum capacity for your autoscaling group number n/a yes
min_instance_capacity The minimum capacity for your autoscaling group number 1 no
pem_key_name The name of the PEM key for your ECS cluster instance string "naluri-devops" no
protect_from_scale_in Protection from scale in/down of instances for your ECS Cluster bool false no
region The AWS region to create ECS cluster in. string "ap-southeast-1" no
resource_tags The tags for your resource map(any) n/a yes
team The team for the ECS cluster string n/a yes
vpc_id The ID of the VPC to create the ECS cluster in. string n/a yes

Outputs

No outputs.

About

Terraform ECS Cluster Module

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages