Giter Site home page Giter Site logo

terraform-aws-ecs-cluster's Introduction

Note: This module is in alpha state and is likely to contain bugs and updates may introduce breaking changes. It is not recommended for production use at this time.

Terraform Amazon ECS on AutoScaling Group Module

Authors: Praveen Kumar Jeyarajan ([email protected]), Viyoma Sachdeva ([email protected]) and Neel Shah ([email protected])

This Terraform module deploys Amazon Elastic Container Service (Amazon ECS) backed by AutoScaling Group (ASG). It deploys a AutoScaling Group created from the Launch Template the user provides. It then deploys a Amazon ECS cluster backed by the ASG, created before, as capacity provider. Users can create the necessary resources for the Launch Template as needed like the VPC, subnets, security group, etc. The module uses the Launch Template ID to create the ASG for use by the Amazon ECS.

Deployment steps

Manage state remotely using Terrafrom Cloud

  1. Install Terraform. For instructions and a video tutorial, see Install Terraform.
  2. Sign up and log into Terraform Cloud. (There is a free tier available.)
  3. Configure Terraform Cloud API access. Run the following to generate a Terraform Cloud token from the command line interface:
terraform login
export TERRAFORM_CONFIG
export TERRAFORM_CONFIG="$HOME/.terraform.d/credentials.tfrc.json"
  1. Configure the AWS Command Line Interface (AWS CLI). For more information, see Configuring the AWS CLI.
  2. If you don't have git installed, install git.
  3. Clone this aws-ia/terraform-aws-ecs-cluster repository using the following command:
git clone https://github.com/aws-ia/terraform-aws-ecs-cluster
  1. Change directory to the root repository directory.
cd /terraform-aws-ecs-cluster/
  1. Change to the workspace configuration directory to initialize and run the configuration
cd setup_workspace
terraform init
terraform apply
  1. After configuring the backend, change to the deploy directory with following command:
cd ../deploy
  1. Initialize the deploy directory by running following command:
terraform init
  1. Setup the values for the varibales and start a Terraform run using the configuration files in your deploy directory. Run the following command:
terraform apply

or

terraform apply -var-file="$HOME/.aws/terraform.tfvars"
  1. Follow the documentation here to deploy docker containers to Amazon ECS and scale them to the desired count as needed.

terraform-aws-ecs-cluster's People

Contributors

tonynv avatar praveenflash avatar andrew-glenn avatar tbulding 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.