Giter VIP home page Giter VIP logo

wordpress-on-aws's Introduction

VPC NETWORKING FOR WORDPRESS WEBSITE

List of Components

1- Create the VPC

2- create internet gateway and attach it to vpc

3- Create 4 Subnets -- 2 Public & 2 Private

4- Create 3 Route Tables -- 1 Public & 2 Private

5- Associate the Public RT to 2 Public Subnets & the 2 Private RT to 2 Private Subnets

6- Create 2 Elastic IP and Associate them to the 2 Nat Gateway

7- Create 2 Nat Gateway for the 2 private Subnets

Remote State File Configuration

Managing the state of your infrastructure is a crucial component of using Terraform. Information about the resources that Terraform is managing, such as the ID of a newly created EC2 instance or the DNS name of a load balancer, is included in the state of your infrastructure.

Terraform modifies the state of your infrastructure to reflect the desired state specified in your Terraform configuration files when you perform commands like terraform apply. This state is kept locally on your computer in a file with the default name of terraform.tfstate. While this is effective for small, one-person projects, it can cause issues for larger teams with multiple members.

To solve this problem, Terraform has the ability to store the state of your infrastructure in a remote location, such as AWS S3. By using a remote state, multiple people on your team can access and update the state of your infrastructure ONCE AT A TIME, and you can also store the state of your infrastructure in version control for auditing and rollback purposes in case of misconfiguration.

Refering at our last configuration, we can take these next steps to implement remote state to our infrstructure.

1 - Create a new module that contain the configuration file to provision the S3 Bucket and the DynamoDB.

2 - Update the provider.tf file by adding the Remote backend configuration code.

        ###########         ###########

                   ###########

Backend

Route53 - Load Balancer - System Manager - ASG - Secrets Manager - RDS

In the first part of this project, I made use of Self-made modules where I created all the components needed to provision the VPC and its sub-components.

In this section, I will make use of open source modules which are modules that are created by the community and shared publicly. These modules are used to automate the provisioning and management of a wide variety of resources. Using open-source modules is easy and pretty straightforward.

Open Source Modules Used:

  • "terraform-aws-modules/security-group/aws"

    Module called to provision the necessary secruity configuration to allow Inbound and outbound traffic.

  • "terraform-aws-modules/rds/aws"

    Module used to provision the Database retaining the App server's data

  • "terraform-aws-modules/autoscaling/aws"

    Used to provision the autoscaling group of App servers.

  • "terraform-aws-modules/acm/aws"

    Creates the TLS/SSL certificate applying the security over HTTP.

  • "terraform-aws-modules/alb/aws"

    Provision the ALB that receives the secured traffic from the Route53 and distribute the traffic through the ASG

  • "terraform-aws-modules/route53/aws//modules/records"

    Provision the DNS record that map the domain name to the ASG Target group.

wordpress-on-AWS

o

wordpress-on-aws's People

Contributors

adamsbag avatar

Stargazers

 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.