/terraform-aws-ecs-cd-code-pipeline

AWS ECS Continuous Deployment (Blue/Green) with AWS CodePipeline in Terraform.

Primary LanguageMakefileMIT LicenseMIT

Terraform Module Name: terraform-aws-ecs-cd-code-pipeline

AWS ECS Continuous Deployment (Blue/Green) with AWS CodePipeline in Terraform.

With this new capability, we can create a new service in AWS Fargate or Amazon ECS that uses CodeDeploy to manage the deployments, testing, and traffic cutover for you. When you make updates to your service, CodeDeploy triggers a deployment. This deployment, in coordination with Amazon ECS, deploys the new version of your service to the green target group, updates the listeners on your load balancer to allow you to test this new version, and performs the cutover if the health checks pass.

General

AWS ECS Continuous Deployment (Blue/Green) with AWS CodePipeline in Terraform This module create following resources in AWS cloud provider..


Prerequisites

This module needs Terraform 0.11.14 or newer. You can download the latest Terraform version from here.

This module deploys aws services details are in respective feature branches.


Features Branches

Below we are able to check the resources that are being created as part of this module call:

From branch : terraform-11/master

  • Code Pipline
  • Code Build
  • Code Deploy
  • VPC
  • S3
  • ECS CLuster (EC2 Model)
  • Auto Scalling Group
  • Launch Template
  • ECS Task Definition
  • ECS Service (nginx)
  • Application Load Balancer

From branch : terrform-12/master (Not yet started)

  • Code Pipline
  • Code Build
  • Code Deploy
  • VPC
  • S3
  • ECS CLuster (EC2 Model)
  • Auto Scalling Group
  • Launch Template
  • ECS Task Definition
  • ECS Service (nginx)
  • Application Load Balancer

Usage

Using this repo

To use this module, add the following call to your code:

git clone https://github.com/nitinda/terraform-aws-ecs-cd-code-pipeline.git?ref=master
cd terraform-aws-ecs-cd-code-pipeline
export GITHUBTOKEN="*********"                      ## GitHub API Token
make plan
make apply

Inputs

The variables required in order for the module to be successfully called from the deployment repository are the following:

Variable Description Type

Outputs

  • alb_dns_name

Diagram

Diagram

Authors

Module maintained by Module maintained by the - Nitin Das