Learn Terraform in this complete course for beginners. Terraform is an open-source infrastructure as code software tool. Learn how it can be utilized to manage and automate your AWS cloud infrastructure. We’ll start off by setting up a free AWS account to play around with and move on to setting up and installing Terraform on a Windows/MAC/Linux machine.
From there we’ll move on to deploying our first resource through terraform and learning other core concepts. You’ll even get a chance to setup a simple web server in AWS.
💻 GitHub Repo: https://github.com/Sanjeev-Thiyagarajan/Terraform-Crash-Course
🔗 Download Terraform: https://www.terraform.io/downloads.html
🎥 This course was developed by Sanjeev Thiyagarajan. Check out his YouTube channel: https://www.youtube.com/channel/UC2sYgV-NV6S5_-pqLGChoNQ
⭐️ Course Contents ⭐️
⌨️ (0:00:00) Intro
⌨️ (0:01:54) AWS Setup
⌨️ (0:05:59) Windows Setup
⌨️ (0:10:04) Mac Setup
⌨️ (0:13:11) Linux Install
⌨️ (0:17:39) VSCode
⌨️ (0:20:51) Terraform Overview
⌨️ (0:43:31) Modifying Resources
⌨️ (0:50:30) Deleting Resources
⌨️ (0:54:55) Referencing Resources
⌨️ (1:04:47) Terraform Files
⌨️ (1:09:45) Practice Project
⌨️ (1:50:32) Terraform State Commands
⌨️ (1:54:05) Terraform Output
⌨️ (2:00:39) Target Resources
⌨️ (2:03:46) Terraform Variables
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://freecodecamp.org/news
And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp
It was great until I got lost in the networking stuffs. Would appreciate some example with S3, Lambda, DynamoDB and Cognito with triggers (I know its a lot) but could be a great experience.
Thanks for the instructive video! I know this setup was from 2 years ago but for practice purposes, I went ahead and terraform-applied the same infrastructure resources on my AWS environment. For some reason, the "user_data" did not get run by terraform so I had to re-run the commands later by ssh'ing into the ec2 instance and properly started the apache2 server.
My heart stopped at 09:32 and I was wondering how my name was showing in cmd, I scrolled down to comments and found your name is Sanjeev too 🙂
i dont think it's a good idea to show how to do things 'all of the ways'. you should save time and just show me the 'best practices' way of doing things.
Very elaborative. It's a very good tutorial for beginners.
If the like button has a multiple times hit feature, i would do that for sure…this tutorial is soo great. Thank you !
Love when you said destroy that sucker
i started getting this error on the subsequent attempts to apply all the config" Error: creating EC2 Instance: UnauthorizedOperation: You are not authorized to perform this operation." Basically it fails creating the EC2 instance, although it worked the first time. Does anyone have any idea?
Excellent training. thank you very much!
Q1: Do we have to create separate network interface for each ec2 instance?
Q2: I thought Security Group and IP addresses are directly assigned to an instance, but it seems you have to assigne private and public IP address to network interface? Can we assign directly these properties to an instance?
Q3: Why multiple ip address can be assigned to a Network Interface (is it not per ec2-instance). I read in documentation you can assign multiple public ip addresses based on multiple private up address? Does this mean same network interface can be assignened to multiple instances?
Q4: If above is true how can then we separate Security Group for each instance?
Excellent refresher for me as I am trying to get Terraform Associate certification. Perfect Language, Pace, Content Flow and many more…I am very impressed and wanted to be like you when delivering a technical presentation…
This guy is the MVP. God bless you bro!
This course was soooo good. Very well put together, flowed nicely and covered alot of good information with real world examples to get started with Terraform. I have definitely subscribed.
Please Ansible !
oh my goodness. this is free money right here
Good level of detail and explanation. Do you have something that addresses how to deal with existing AWS or what happens if someone touches your setup thru the console?
user_data part from 'Practice Project' didn't work for me. I think EC2 don't have apt anymore. Using yum worked tho:
user_data = <<EOF
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
systemctl enable httpd.service
echo "Hello from Terraform deployed website!" > /var/www/html/index.html
super session Sanjeev
Question about the state file: wondering if anything changed manually on EC2, would that state get synchornized with Teaaraform's state file by its own?
When I run the public IP on my browser, it brought out an ubuntu page instead of the index.html content. Was there something that I did wrong?
"What's going on, guys? So I decided to make a quick crash course on Terraform…"
AND THE VIDEO HAS 2 HOURS OF NON-STOP INSTRUCTIONS.
This is a fantastic tutorial! Thank you so much for making this – it has helped me greatly!
Love the way you have done the explanations….Super easy to understand even for a beginner.. brother..keep up the great work….
Is there anything that can be done to let terraform know of the resources that you already have created in AWS? or do you have to manually recreate all those resources with terraform?
I need to automate AWS image builder pipe line from terraform. Is there any video which I can see and implement it please…
Well, looks like it all turned out to be a scam sadly. I hope people have learned their lesson about Terraform. 🙁
Great video and teaching skills, easy to follow and clear explanations. love it
Wonderful course Sanjeev .. thank you so much for making it so understandable
Just done with this video. I must say it's very clear and concise. Great work.
Great video! Perfect pace too. I followed along and had almost no issues. Since it's a year later, I used Ubuntu 20.04. Seems by default apache2 doesn't listen on 443, so clicking the web link in the AWS console for the EC2 instance doesn't work. Just change https to http and it will show your message.
EOF is End Of File. That <<- syntax is called a "Here File" or "Here Document" which you can search for more info.
The user_data section already runs as root so you don't need sudo.
If you use an IntelliJ IDE it provides a lot of convenient auto completion for Terraform files. It helped me avoid the error you got with depends_on by automatically making the value an array.
This is awesome very clear and understandable for technical nontechnical people we really appreciate, but one thing I don't understand how you commit or disable specific code or specific line.
passed an interview today with this video, thank you !!!
Great content, great presentation, great utility.
i understand it better than never before. thanks
thanks for this content, this helped me have my first meaningful tf code
Great video! What VS code extension are you using to automatically format the code when you save the file?
Thank you for that!
Starting my Terraform journey. This is a good tutorial, though my SSH via Putty doesn't seem to work. It doesn't accept the key that I made and I can't access the web server in AWS either as I get a connection refused error. I can connect to it via EC2 instance connect though.
EDIT: Disregard, it worked. Didn't change a thing. PuTTY didn't open the first time, but the second time it did after EC2 instance connect. Still can't access via web browser but I can get on SSH at least.
FYI for anyone who struggled with the user_data not executing… Under `key_name = "main-key"` I added another variable, `user_data = file("userdata.tpl")` then I made a new file called userdata.tpl and pasted all the commands to install apache server.
Finally, a tutorial that actually explains to beginners. Some other videos claim to be for beginners and then 5mins into the video, they start pulling steps put of thin air!
Thank you so much for this. This is so simplified that I found this very very helpful!
Excellent vedio I have seen in terraform. I took 2 udemi course to learn it.but you gave everything in one. appreciate your time and effort .
Hi Sanjeev – one very basic question. do you have any video on how to install / enable GUI for linux and install visual source code
Excellent crash course.