Last active
February 11, 2024 10:25
-
-
Save sampathshivakumar/e2a5a3bf762e1009cb2654ef181276ba to your computer and use it in GitHub Desktop.
Revisions
-
sampathshivakumar renamed this gist
Jun 8, 2023 . 1 changed file with 78 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,6 +89,84 @@ The following illustration shows an example of a simple, generic three-tier appl ### Now let's try to build the same using Terraform **In two ways we can build the Three-Tier Architecture in AWS Using Terraform  **As i have previously build EC2 instance with Security group using Terraform resources, i would like to go with module this time.** ### I have created a folder and named it Three-Tier Architecture on my pc.  **I have created 3 files, versions.tf, variables.tf and vpc.tf** **Inside of vpc.tf only we are going to use/create vpc terraform module**  ### Lets start writing terraform configuration files.  **we have to input vpc module details in vpc.tf**   **For subnet divisions i am using Visual Subnet Calculator** **link:-** https://www.davidc.net/sites/default/subnets/subnets.html  ### Now lets apply terraform init  **After terraform init, .terraform directory and .terraform.lock.hcl file is created.  **.terraform.lock.hcl file contains a lock file format specific to HCL (HashiCorp Configuration Language) and is used to lock the versions of the provider plugins and modules used in your Terraform configuration.**  ### .terraform directory structure  ### Apply terrafor validate  ### Apply terraform plan and apply Plan: 30 to add, 0 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes ### you can see my-own-vpc created  ### Three-Tier Architecture is created using terraform  **Thank you for reading this post! I hope you found it helpful. If you have any feedback or questions,Please connect with me on LinkedIn at https://www.linkedin.com/in/sampathsivakumar-boddeti-1666b810b/. Your feedback is valuable to me. Thank you!** -
sampathshivakumar created this gist
Jun 4, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,94 @@ ## Three-Tier Architecture in AWS Using Terraform The three-tier architecture is the most popular implementation of a multi-tier architecture and consists of a single presentation tier, logic tier, and data tier. The following illustration shows an example of a simple, generic three-tier application.  **GitHub Repo:-** https://github.com/sampathshivakumar/3-Tier-Architecture-Terraform ### Resources need to be created are * **Custom VPC** * **2-Subnets (Public)** * **1 Subnet (Private)** * **2-EC2-Instances** * **Security Group** * **Elastic-IP** * **NAT Gateway** * **Internet Gateway** * **Route Table** * **Application Load Balancer** * **Webserver** * **MySQL-DB** ### Flow of creating Three-Tier Architecture using AWS Management Console ### Create a Custome VPC    ### Now create Subnets    ### Now Create Route tables     ### Now lets Create Internet gateway   ### Attach the Internet gateway to a VPC    ### Let's Create NAT Gateway   ### Now lets Edit subnet associations and Add Route to Internet gateway to my-Public-subnet      ### Now lets Edit subnet associations and Add Route to NAT-Gateway to my-Private-subnet    ### Now we can see the Resource map in Your VPCs   ### Now let's Clean the resoures  ### Now let's try to build the same using Terraform