Coder Social home page Coder Social logo

ecs-deploy-terraform's Introduction

ECS-deployment-using-terraform

This document will provide you all the details how to configure the github actions to deploy the ECS Service using terraform

Create AWS resources using Terraform#####

In this workflow, we will deploy an ECS service using following AWS resources

  1. VPC
  2. Security Groups
  3. ECS Cluster
  4. ECS Service
  5. Application Load Balancer
  6. IAM Role
  7. Task Definition for ECS Service
  8. Target Groups for ALB

How to test

  1. Get the loadbalancer DNS name
  2. Open it in the browser `http://DNSName/LoginWebApp-1

Github Actions Workflow

To have basic understanding of Github actions, please follow Github Action Basic Video

To have basic understanding of terraform Deployment using Github actions, please follow Terraform Deployment using Github Actions

Basics of Github actions in the workflow

  1. Use a build matrix if you want your workflow to run tests across multiple combinations of operating systems, platforms, and languages.
  2. Use of matrix to run the workflow for different environments or even you can set different variables as per the environment if needed
  3. Connect to AWS account using Github secrets
  4. Use of workflow-dispatch to trigger the workflow manually
  5. Use of max-parallel to run the job for both the environments in parallel
  6. Set working directory to any of your subfolder
  7. Use of Environments in the workflow to approve the changes for higher environments if needed.

Deploy only when push to main branch (deploy.yaml)

We will be applying the changes only when there is a push in the main branch.

References

  1. https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows
  2. https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions

ecs-deploy-terraform's People

Contributors

nickkletnoi avatar devops4solutions avatar

Watchers

 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.