GithubHelp home page GithubHelp logo

kevinburkeomg / terraform-aws-ecs-cluster Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trussworks/terraform-aws-ecs-cluster

0.0 0.0 0.0 10 KB

Creates an ECS cluster backed by an Auto Scaling Group

Home Page: https://registry.terraform.io/modules/trussworks/ecs-cluster/aws

License: BSD 3-Clause "New" or "Revised" License

HCL 100.00%

terraform-aws-ecs-cluster's Introduction

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 = "../modules/aws-ecs-cluster"

  name        = "app"
  environment = "prod"

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

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

Inputs

Name Description Type Default Required
desired_capacity Desired instance count. string 2 no
environment Environment tag. string - yes
image_id Amazon ECS-Optimized AMI. string - 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 - yes
subnet_ids A list of subnet IDs to launch resources in. list - 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. string - 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.

terraform-aws-ecs-cluster's People

Contributors

brainsik avatar kevinburkeomg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.