Giter Club home page Giter Club logo

terraform-playground's Introduction

Terraform Project

Deploy a high availablle insfrustructure solution on aws using terraform, making use of variables, modules, aws SES and lambda,
we are also triggering the terraform code from a jenkins docker based pipeline.

alt text alt text

Open playground-2 video to see it live :D

playgroung-1 task

First : configure remote backend and configure state locking using s3 and dynamo db

Networking

1- create vpc
2- create internet gateway
3- 2 public subnets and 2 private subnets , seperated in two AZ's , every Az has one public and one private
4- create public route table
5- create public route
6- attach public route table to subnets
7- create nat gateway
8- create private route table
9- create private route table
10- attach it to private subnets

Compute


7- create security group which allow ssh from 0.0.0.0/0
8- create security group that allow ssh and port 3000 from vpc cidr only
7- create ec2(bastion) in public subnet with security group from 7
8- create ec2(application) private subnet with security group from 8

playgroung-2 task

manual

it deploys in the region of your choise:
1- mandatory to enter 4 subnets configs , 2 public , 2 private
2- two of your ec2 will be placed in your public subnets , the other two in the private subnets
3- an ssh key will be created fot both public ec2 , and another one for the private
4- security groups
5- 2 natgateways
6- internet gateway
7- 2 elastix ip addresses

Lab2 Break Down


1-create two workspaces dev and prod
2-create two variable definition files(.tfvars) for the two environments
3-separate network resources into network module
4-apply your code to create two environments one in us-east-1 and us-east-2
5-run local-exec provisioner to print the public_ip of bastion ec2
6- upload infrastructure code on github project
7-create jenkins image with terraform installed inside it
8- create pipeline that takes env-param to apply terraform code on certain env
9-verify your email in ses service
10- create lambda function to send email
11-create trigger to detect changes in state file and send the email

terraform-playground's People

Contributors

samy-soliman 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.