Coder Social home page Coder Social logo

terraform-ecs-fargate-spot-instances-traefik's Introduction

Terraform AWS - ECS Fargate Spot Instances, Networking & Traefik

Table of Contents

About The Project

There are many issues involved when creating new project infrastructures.

Here's why:

  • It's difficult to handle projects maintenance when there's no codified infrastructure, you don't know what and how much resources are being used.
  • Cross development gets harder since there's no idea about how the application infrastructure work.
  • The process of manually creating your infrastructure takes so much time.
  • It's difficult to create an infrastructure cost prediction.

Due to these issues, Terraform is an IaC (Infrastructure as Code) tool to automate your setup.

Getting Started

To get your infrastructure up and running follow the steps:

Prerequisites

aws configure
  • Create an AWS Secrets Manager secret to store your AWS secret access key, and grab its ARN.

  • Terraform v0.14.5

  • Check the fixtures.staging.us-west-2.tfvars file variables, and set them according to your environment. Or create one file for another environment :).

Usage

  1. Go to the remote-state folder and initialize your remote state using AWS S3 and DynamoDB. (Optional, but recommended).
terraform init
terraform apply -var-file=../fixtures.staging.us-west-2.tfvars
  1. Install all modules required by this configuration.
cd ../
terraform init
  1. Apply your infrastructure based on environment variables. (Check variables.tf and create a terraform tfstate file if necessary)
terraform apply -var-file=fixtures.staging.us-west-2.tfvars
  1. (Optional) - If you want to estimate your infrastructure costs, so you may generate a terraform plan and analyze it with terraform cost estimation
terraform plan -var-file=fixtures.staging.us-west-2.tfvars  -out=plan.tfplan && terraform show -json plan.tfplan > plan.json

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.