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!
You have done such a great job, truly amazing short video but explained a lot. Thanks a lot.
Thanks Kamal, glad it was helpful!
Amazing, short and straight forward 👍💪🏾
Thanks for your feedback, glad it was helpful for you.
simple as that, awesome lab Ajit and thank you very much....
Thanks Sean for your feedback!
Thanks Ajit for detail explanation. Great video. 👍
Thanks Harshal! Glad it was helpful for you
Wonderful work! Thanks a bunch!! 🤩
Thanks Le Dinh! Glad it was helpful.
This is truly amazing training video... thanks for your efforts. the clean video provides answers to some of my questions .
thank you
Thanks Samuel. Glad it was helpful for you. Please let me know if you have any video requests. I’ll try to accommodate. Thanks!
Great video, looking for the exact video..
Thank you so much..
Thanks Anil, glad it was helpful for you.
Thanks Buddy , a subscriber from kerala
Hi,
Glad it was helpful for you.
Excellent and very useful information 💯 Thankyou
Thank you for your feedback
Thank you so much for this masterpiece Bahi
Hello,
Thanks for your feedback, glad you liked it!
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!
Thanks for pointing out, I will update that.
Aap jo projects karate ho unhe Hindi me bhi banao logo ko pasand aayenge and you doing great job 😊😊
Thanks Manoj. Shukriya, me Hindi me bhi shuru kar raha hu. Jald hi.
Amazing explanation can you make one terraform video for Azure as well
Sure, Abhijeet I have noted down your request. Thanks for your feedback.
bro please looking at the code I don't see where you specified instance type and information in regards to instances. Please help
Hello,
Please check line no 27 from here
github.com/ajitinamdar-tech/three-tier-arch-aws-terraform/blob/main/terraform.tfvars#L27
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?
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.
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
Hi,
Sure. I have noted down your request. Thank you.
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
We have consumed modules right, the code for all network components is mentioned in the official aws modules.
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!
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!
nice video, if I want to provision laravel also with it. will it be seperate .tf file?or how?
Hi Nidhi,
Thanks for your feedback. Yes you can customise the TF code according to your requirements.
@@ajitinamdartech ok , means for laravel it will be in same asg.tf.
also what if I dont create S3 bucket?
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
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.
Hello sir, How and where did you create the instances (servers), I will appreciate if you can explain a little bit
thanks
Hi,
Could you please elaborate on your question?
@@ajitinamdartech sorry if the question is not clear but I didn’t see how Ec2 instances are created which represents the servers
They are created using Terraform
@@ajitinamdartech yes sir i know we are using terraform to configure a 3 tier app but i can figure out the ec2 module
@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.
which software should be use to write code ?
Hello,
Visual studio code should be good for you.
@@ajitinamdartech thank you so much bhai for your proper reply
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??
Hello,
Please reach out to me at ajitinamdar.tech@gmail.com. Send me the required screenshots, and I will try to help. Thanks
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
Hello,
Can you please check the keys for the dynamo db table are as per the demo?