Code Monkey home page Code Monkey logo

aws-web-app-terraform's Introduction


DevOps Practice with Terraform

This repository contains a basic web application demonstrating DevOps practices utilizing Infrastructure as Code (IaC) with Terraform.

Jenkins Workflow

image

User Workflow

image

Overview

The project aims to showcase essential Terraform commands to manage infrastructure effectively:

  • Initialization: Initializes Terraform project

    terraform init
  • Validation: Check if the Terraform configuration is valid.

    terraform validate
  • Planning: View the entire infrastructure plan before deployment.

    terraform plan
  • Code Formatting: Keep your Terraform code consistent and formatted.

    terraform fmt
  • Deployment: Deploy the infrastructure using Terraform.

    terraform apply

AWS Authentication

Before running the terraform plan or terraform apply commands, make sure to authenticate with AWS:

export AWS_ACCESS_KEY_ID=<key id>
export AWS_SECRET_ACCESS_KEY=<secret>

Replace <key id> and <secret> with your AWS access key ID and secret access key. This ensures that Terraform has the necessary permissions to create and manage resources on AWS.

Project Details

This Terraform project accomplishes the following:

  • Infrastructure Deployed: Creates an ECS cluster with Fargate launch type.
  • Containerized Application: Runs a Docker container with a simple web app Docker image from Amazon ECR.
  • Load Balancer Configuration: Places the container behind a load balancer for traffic distribution.

Note on Project Configuration

For simplicity, the project is set up within the default Amazon VPC. However, it's strongly advised to configure and use your own VPC to implement specific security measures and network isolation best practices.

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository.
  2. Ensure Terraform is installed on your machine.
  3. Set up AWS authentication as mentioned above.
  4. Run the commands mentioned in the Overview section to validate, plan, format, and deploy the infrastructure.

Additional Notes

  • Modify the Terraform configurations (*.tf) according to your infrastructure requirements.
  • Always review the Terraform plan before applying changes to your infrastructure.
  • Ensure proper credentials and permissions are set for deploying infrastructure.

aws-web-app-terraform's People

Contributors

ajaykaarthic avatar

Stargazers

 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.