All Projects → trussworks → terraform-aws-ecs-cluster

trussworks / terraform-aws-ecs-cluster

Licence: BSD-3-Clause license
Creates an ECS cluster backed by an Auto Scaling Group

Programming Languages

HCL
1544 projects
go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to terraform-aws-ecs-cluster

neo4j-aws-causal-cluster
Neo4j Enterprise Causal Cluster on AWS ECS by GetSocial
Stars: ✭ 24 (-57.89%)
Mutual labels:  ecs, aws-ecs, ecs-cluster
ecsdemo-crystal
Part 4 of a 4 part ECS Workshop
Stars: ✭ 54 (-5.26%)
Mutual labels:  ecs, ecs-cluster
terraform-aws-ecs-web-app
Terraform module that implements a web app on ECS and supports autoscaling, CI/CD, monitoring, ALB integration, and much more.
Stars: ✭ 175 (+207.02%)
Mutual labels:  ecs, ecs-cluster
Ecs Deploy
Powerful CLI tool to simplify Amazon ECS deployments, rollbacks & scaling
Stars: ✭ 541 (+849.12%)
Mutual labels:  ecs, aws-ecs
terraform-ecs
Terraform ECS module
Stars: ✭ 15 (-73.68%)
Mutual labels:  ecs, ecs-cluster
Ecs Exporter
Export AWS ECS cluster metrics to Prometheus
Stars: ✭ 127 (+122.81%)
Mutual labels:  ecs, aws-ecs
terraform-aws-ecs-service
Creates an ECS Service.
Stars: ✭ 86 (+50.88%)
Mutual labels:  ecs, aws-ecs
Terraform Aws Ecs
Terraform module which creates AWS ECS resources
Stars: ✭ 203 (+256.14%)
Mutual labels:  ecs, aws-ecs
aws-ecs-orb
An orb that simplifies deployment to Amazon's Elastic Container Service (ECS). Supports both EC2 and Fargate launch types.
Stars: ✭ 48 (-15.79%)
Mutual labels:  ecs, aws-ecs
terraform-aws-ecs-cluster
Terraform module for building an ECS cluster in AWS
Stars: ✭ 42 (-26.32%)
Mutual labels:  ecs, ecs-cluster
ecs-autoscale
A framework that runs on AWS Lambda for autoscaling ECS clusters and services
Stars: ✭ 69 (+21.05%)
Mutual labels:  ecs, aws-ecs
layer0
Build, Manage, and Deploy Your Applications
Stars: ✭ 40 (-29.82%)
Mutual labels:  ecs
ecs-taskmetadata-cloudwatch
An example sidecar container for Amazon ECS and AWS Fargate to enable task/container-level metrics on CloudWatch
Stars: ✭ 17 (-70.18%)
Mutual labels:  ecs
ecsview
Browse your AWS ECS Clusters in the Terminal
Stars: ✭ 100 (+75.44%)
Mutual labels:  ecs
artemis-odb-entity-tracker
🎲 Visual Entity Tracker for ECS library: artemis-odb
Stars: ✭ 27 (-52.63%)
Mutual labels:  ecs
container-service-discovery
Service Discovery in Container Orchestration Frameworks on AWS
Stars: ✭ 45 (-21.05%)
Mutual labels:  ecs
Learning-Unity-ECS
A bunch of small Unity projects where I explore and learn Unity's new ECS and Job System.
Stars: ✭ 60 (+5.26%)
Mutual labels:  ecs
LockstepECS
Fast Lockstep ECS Framework
Stars: ✭ 177 (+210.53%)
Mutual labels:  ecs
eo-logger
Isomorphic JavaScript logger based on Elastic Common Schema
Stars: ✭ 21 (-63.16%)
Mutual labels:  ecs
microservices-demo.github.io
The Microservices Demo website.
Stars: ✭ 65 (+14.04%)
Mutual labels:  ecs

Creates an ECS cluster backed by an AutoScaling Group.

The cluster is minimally configured and expects any ECS service added will use awsvpc networking and Task IAM Roles for access control.

Creates the following resources:

  • IAM role for the container instance.
  • Launch Configuration and AutoScaling group.
  • ECS cluster.

Usage

data "aws_ami" "ecs_ami" {
  most_recent = true
  owners      = ["amazon"]

  filter {
    name   = "name"
    values = ["amzn-ami-*-amazon-ecs-optimized"]
  }
}

module "app_ecs_cluster" {
  source = "trussworks/ecs-cluster/aws"

  name        = "app"
  environment = "prod"

  image_id      = "${data.aws_ami.ecs_ami.image_id}"
  instance_type = "t2.micro"

  vpc_id           = "${module.vpc.id}"
  subnet_ids       = "${module.vpc.private_subnets}"
  desired_capacity = 3
  max_size         = 3
  min_size         = 3
}

Terraform Versions

Terraform 0.13. Pin module version to ~> 3.0. Submit pull-requests to master branch.

Terraform 0.12. Pin module version to ~> 2.0. Submit pull-requests to terraform012 branch.

Terraform 0.11. Pin module version to ~> 1.0. Submit pull-requests to terraform011 branch.

Requirements

Name Version
terraform >= 0.13.0
aws ~> 3.0

Providers

Name Version
aws ~> 3.0

Modules

No modules.

Resources

Name Type
aws_autoscaling_group.main resource
aws_ecs_cluster.main resource
aws_iam_instance_profile.ecs_instance_profile resource
aws_iam_role.ecs_instance_role resource
aws_iam_role_policy_attachment.ecs_instance_role_policy resource
aws_launch_configuration.main resource
aws_security_group.main resource
aws_security_group_rule.main resource
aws_iam_policy_document.ecs_instance_assume_role_policy data source

Inputs

Name Description Type Default Required
desired_capacity Desired instance count. string 2 no
environment Environment tag. string n/a yes
image_id Amazon ECS-Optimized AMI. string n/a yes
instance_type The instance type to use. string "t2.micro" no
max_size Maxmimum instance count. string 2 no
min_size Minimum instance count. string 2 no
name The ECS cluster name this will launching instances for. string n/a yes
security_group_ids A list of security group ids to attach to the autoscaling group list(string) [] no
subnet_ids A list of subnet IDs to launch resources in. list(string) n/a yes
use_AmazonEC2ContainerServiceforEC2Role_policy Attaches the AWS managed AmazonEC2ContainerServiceforEC2Role policy to the ECS instance role. string true no
vpc_id The id of the VPC to launch resources in. any n/a yes

Outputs

Name Description
ecs_cluster_arn The ARN of the ECS cluster.
ecs_cluster_name The name of the ECS cluster.
ecs_instance_role The name of the ECS instance role.

Developer Setup

Install dependencies (macOS)

brew install pre-commit go terraform terraform-docs
pre-commit install --install-hooks

Testing

Terratest is being used for automated testing with this module. Tests in the test folder can be run locally by running the following command:

make test

Or with aws-vault:

AWS_VAULT_KEYCHAIN_NAME=<NAME> aws-vault exec <PROFILE> -- make test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].