Three-tier architecture in AWS using Terraform

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ค. 2024
  • In this video, we will learn how to a deploy a three-tier architecture in AWS using Terraform
    #terraform #aws #infrastructureascode
    ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
    00:00 | Intro
    00:42 | Architecture
    01:46 | What you are going to learn?
    02:38 | Pre-requisites
    03:34 | Environment walkthrough
    04:35 | Code walkthrough
    13:28 | Terraform init
    14:23 | Terraform plan
    15:15 | Terraform apply
    16:12 | Provisioned Infrastructure
    20:20 | Application check
    22:32 | Stickiness
    23:56 | Security groups
    24:45 | Health checks
    26:58 | Github and thank you
    ▬▬▬▬▬▬ Important links❗️ ▬▬▬▬▬▬
    ► GitHub repo - github.com/ajitinamdar-tech/t...
    ► Demo | Three-tier web app in AWS with VPC, ALB, EC2 & RDS - • Demo | Three-tier web ...
    ► Terraform backend using S3 and Dynamodb with state locking | DevOps | Infrastructure as code - • Terraform backend usin...
    ► Terraform AWS provider - registry.terraform.io/provide...
    ► Terraform VPC module - registry.terraform.io/modules...
    ► Terraform ALB module - registry.terraform.io/modules...
    ► Terraform Security group modules - registry.terraform.io/modules...
    registry.terraform.io/modules...
    ► Terraform ASG module - registry.terraform.io/modules...
    ► Terraform RDS module - registry.terraform.io/modules...
    ▬▬▬▬▬▬ My Videos 📹 ▬▬▬▬▬▬
    CI CD Tutorials:-
    ► Jenkins Tutorial - Java CI/CD Pipeline with GitHub, Maven & Tomcat - • Jenkins Tutorial - Jav...
    Learn AWS:-
    ► 3 real-life scenarios to kick-start your AWS journey now!
    - • 3 real-life scenarios ...
    ► Demo - Delegate access across AWS accounts using IAM roles - • Demo - Delegate access...
    Learn Kubernetes:-
    ► Configure Kubernetes master-worker node using kubeadm on Amazon Linux - • Kubernetes master-work...
    ► Kubernetes namespaces explained - demo and use-cases - • Kubernetes namespaces ...
    Learn Jenkins:-
    ► Scale Jenkins using EC2 plugin - • Scale jenkins slave us...
    ► Jenkins role based authorisation strategy | Manage and assign roles | DevOps - • Jenkins role based aut...
    Learn DevOps:-
    ► Become a DevOps Engineer in 2021 | DevOp Engineer roadmap - • Become a DevOps Engine...
    ► Top 5 DevOps Certifications in 2021 | Learn DevOps - • Top 5 DevOps Certifica...
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ► Connect with me on LinkedIn: / ajitinamdar
    Disclaimer: Opinions expressed in this video are my own!

ความคิดเห็น • 54

  • @kamkum2k
    @kamkum2k ปีที่แล้ว

    You have done such a great job, truly amazing short video but explained a lot. Thanks a lot.

  • @opeyemiojo1154
    @opeyemiojo1154 10 หลายเดือนก่อน +2

    Amazing, short and straight forward 👍💪🏾

    • @ajitinamdartech
      @ajitinamdartech  10 หลายเดือนก่อน

      Thanks for your feedback, glad it was helpful for you.

  • @seanjohn4133
    @seanjohn4133 ปีที่แล้ว +1

    simple as that, awesome lab Ajit and thank you very much....

  • @harshalkondke6344
    @harshalkondke6344 ปีที่แล้ว +1

    Thanks Ajit for detail explanation. Great video. 👍

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว

      Thanks Harshal! Glad it was helpful for you

  • @ledinhanhtan
    @ledinhanhtan ปีที่แล้ว

    Wonderful work! Thanks a bunch!! 🤩

  • @samuelowa6623
    @samuelowa6623 ปีที่แล้ว +1

    This is truly amazing training video... thanks for your efforts. the clean video provides answers to some of my questions .
    thank you

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว

      Thanks Samuel. Glad it was helpful for you. Please let me know if you have any video requests. I’ll try to accommodate. Thanks!

  • @anil-kumar75
    @anil-kumar75 ปีที่แล้ว +1

    Great video, looking for the exact video..
    Thank you so much..

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว +1

      Thanks Anil, glad it was helpful for you.

  • @riyasudheen94
    @riyasudheen94 ปีที่แล้ว +1

    Thanks Buddy , a subscriber from kerala

  • @rchandrakumar8842
    @rchandrakumar8842 8 หลายเดือนก่อน +1

    Excellent and very useful information 💯 Thankyou

    • @ajitinamdartech
      @ajitinamdartech  8 หลายเดือนก่อน

      Thank you for your feedback

  • @thee__afro
    @thee__afro 8 หลายเดือนก่อน +2

    Thank you so much for this masterpiece Bahi

    • @ajitinamdartech
      @ajitinamdartech  8 หลายเดือนก่อน

      Hello,
      Thanks for your feedback, glad you liked it!

  • @ibmuser13
    @ibmuser13 2 หลายเดือนก่อน +1

    Nice walkthrough Ajit. At 18:41, why do the instances have 2 private IP addresses each? Also, the link to the RDS module in the video description points to the SG module .... Thanks in advance!

    • @ajitinamdartech
      @ajitinamdartech  หลายเดือนก่อน

      Thanks for pointing out, I will update that.

  • @Manojislive
    @Manojislive ปีที่แล้ว +1

    Aap jo projects karate ho unhe Hindi me bhi banao logo ko pasand aayenge and you doing great job 😊😊

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว

      Thanks Manoj. Shukriya, me Hindi me bhi shuru kar raha hu. Jald hi.

  • @abhijeetjambaldare14
    @abhijeetjambaldare14 ปีที่แล้ว +1

    Amazing explanation can you make one terraform video for Azure as well

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว

      Sure, Abhijeet I have noted down your request. Thanks for your feedback.

  • @thee__afro
    @thee__afro 8 หลายเดือนก่อน +2

    bro please looking at the code I don't see where you specified instance type and information in regards to instances. Please help

    • @ajitinamdartech
      @ajitinamdartech  8 หลายเดือนก่อน

      Hello,
      Please check line no 27 from here
      github.com/ajitinamdar-tech/three-tier-arch-aws-terraform/blob/main/terraform.tfvars#L27

  • @user-pw5bj7hd5p
    @user-pw5bj7hd5p 9 หลายเดือนก่อน +1

    Such a great explanation within very short time.
    Will I be able to create the resources being under free tier if I use the same code provided in reference GitHub URL?

    • @ajitinamdartech
      @ajitinamdartech  9 หลายเดือนก่อน +1

      Hi,
      Thank you for your feedback.
      All the resources won’t fall under a free tier but you can always create and delete it as soon as you are done, the cost would be negligible.

  • @vinvvinv7460
    @vinvvinv7460 ปีที่แล้ว +1

    Hi can you please make a video & explain the writing/structure of Ansible & Terraform in a simple manner & in layman's terms, like when & where to add spaces, hyphens, what is variable, etc it's a bit confusing ... please it's a request, do reply

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว

      Hi,
      Sure. I have noted down your request. Thank you.

  • @riyasudheen94
    @riyasudheen94 ปีที่แล้ว +1

    Bro. I watched the video two times. One thing is still not certain . In the entire coding of multiple terraform files in visual studio code, no where we have specified the variables to create route table and internet gateway . But after the final terraform apply command both route tables ( 2 route tables) and an internet gateway was created . How did this happen ? Pls let me know

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว +1

      We have consumed modules right, the code for all network components is mentioned in the official aws modules.

  • @ibmuser13
    @ibmuser13 2 หลายเดือนก่อน

    Hello Ajit....so we are logging on to the PHP application but why are we entering RDS username and password? I know you mentioned something about replacing localhost with the RDS connection string.....but aren't they 2 different components? PHP is an APP and RDS is a DB.....pls help me clear this confusion, if you could explain in a few words since I have an infra background ... thanks much for your hard work!

    • @ajitinamdartech
      @ajitinamdartech  หลายเดือนก่อน

      We have treated PHPMyAdmin as a demo application in this case. For every application we need to connect to the database to perform certain read write operations. So for that purpose I have entered the RDS credentials over there. Hope it was helpful!

  • @user-id9yb3sr4h
    @user-id9yb3sr4h ปีที่แล้ว +1

    nice video, if I want to provision laravel also with it. will it be seperate .tf file?or how?

    • @ajitinamdartech
      @ajitinamdartech  ปีที่แล้ว

      Hi Nidhi,
      Thanks for your feedback. Yes you can customise the TF code according to your requirements.

    • @user-id9yb3sr4h
      @user-id9yb3sr4h ปีที่แล้ว

      @@ajitinamdartech ok , means for laravel it will be in same asg.tf.
      also what if I dont create S3 bucket?

  • @SandhyaKondmare
    @SandhyaKondmare 10 หลายเดือนก่อน +1

    sir why we created s3 bucket through the console why we didn't create in this same terraform module why we didn't add s3 code

    • @ajitinamdartech
      @ajitinamdartech  10 หลายเดือนก่อน +2

      Hello,
      It can be created using Terraform but this was the pre-requisite for our terraform project, hence I created it manually as it was only meant to be created once.

  • @tubuobaggio
    @tubuobaggio 8 หลายเดือนก่อน +1

    Hello sir, How and where did you create the instances (servers), I will appreciate if you can explain a little bit
    thanks

    • @ajitinamdartech
      @ajitinamdartech  8 หลายเดือนก่อน

      Hi,
      Could you please elaborate on your question?

    • @tubuobaggio
      @tubuobaggio 8 หลายเดือนก่อน +1

      @@ajitinamdartech sorry if the question is not clear but I didn’t see how Ec2 instances are created which represents the servers

    • @ajitinamdartech
      @ajitinamdartech  8 หลายเดือนก่อน

      They are created using Terraform

    • @tubuobaggio
      @tubuobaggio 8 หลายเดือนก่อน

      @@ajitinamdartech yes sir i know we are using terraform to configure a 3 tier app but i can figure out the ec2 module

    • @ajitinamdartech
      @ajitinamdartech  8 หลายเดือนก่อน

      @tubuobaggio github.com/ajitinamdar-tech/three-tier-arch-aws-terraform/blob/main/asg.tf
      Please refer this file. This is used to create the ec2 instances.

  • @sachintandon554
    @sachintandon554 4 หลายเดือนก่อน

    which software should be use to write code ?

    • @ajitinamdartech
      @ajitinamdartech  4 หลายเดือนก่อน +1

      Hello,
      Visual studio code should be good for you.

    • @sachintandon554
      @sachintandon554 4 หลายเดือนก่อน

      @@ajitinamdartech thank you so much bhai for your proper reply

  • @user-vb2xc2yh7i
    @user-vb2xc2yh7i 7 หลายเดือนก่อน

    Error: Unsupported attribute

    │ on outputs.tf line 666, in output "db_instance_id":
    │ 666: value = module.rds.db_instance_id
    │ ├────────────────
    │ │ module.rds is a object

    │ This object does not have an attribute named "db_instance_id".


    │ Error: Unsupported attribute

    │ on outputs.tf line 687, in output "db_instance_password":
    │ 687: value = module.rds.db_instance_password
    │ ├────────────────
    │ │ module.rds is a object

    │ This object does not have an attribute named "db_instance_password".
    I can't figure out that why I am getting this error.. please help me sir in troubleshooting this issue??

    • @ajitinamdartech
      @ajitinamdartech  5 หลายเดือนก่อน

      Hello,
      Please reach out to me at ajitinamdar.tech@gmail.com. Send me the required screenshots, and I will try to help. Thanks

  • @SandhyaKondmare
    @SandhyaKondmare 10 หลายเดือนก่อน +1

    Error: Error acquiring the state lock

    │ Error message: 2 errors occurred:
    │ * ValidationException: One or more parameter values were invalid: Missing
    the
    │ key terraform.tfstate in the item
    │ status code: 400, request id:
    │ CKQLNTMDJF2M141172CJISSSH7VV4KQNSO5AEMVJF66Q9ASUAAJG
    │ * ValidationException: The provided key element does not match the schema
    │ status code: 400, request id:
    │ BO6T9SVQM2UBEQNMKLPEMV80ONVV4KQNSO5AEMVJF66Q9ASUAAJG



    │ Terraform acquires a state lock to protect the state from being written
    │ by multiple users at the same time. Please resolve the issue above and try
    │ again. For most commands, you can disable locking with the "-lock=false"
    │ flag, but this is not recommended. i used the same github code with some changes but showing this error can anyone help with this

    • @ajitinamdartech
      @ajitinamdartech  10 หลายเดือนก่อน +1

      Hello,
      Can you please check the keys for the dynamo db table are as per the demo?