Terraform installation using Vagrant

Edward Viaene
A free video tutorial from Edward Viaene
DevOps, Cloud, Big Data Specialist
4.3 instructor rating • 12 courses • 166,355 students

Lecture description

An alternative installation procedure using Vagrant. This will allow you to use exactly the same setup I have!

Learn more from the full course

Learn DevOps: Infrastructure Automation With Terraform

Learn how to automate your infrastructure with terraform. Covers Terraform with AWS, Packer, Docker, ECS, EKS, Jenkins

08:01:55 of on-demand video • Updated June 2020

  • Understand, use and apply terraform
  • Know when to use different features
  • Use terraform with AWS
  • Use terraform with Packer to create custom images
  • Be able to apply DevOps techniques using terraform
English In this demo, I will show you how to install Terraform using Vagrant. If you're like me, I don't really like to install anything on my Mac without using Vagrant. If you don't really know what Vagrant is, it just a very simple way of starting virtual machines. So, first what you will need, if you want to go the Vagrant way is to download VirtualBox. Just go to "http://virtualbox.org" and you click "Download VirtualBox", then you go to "http://vagrantup.com" and download Vagrant. You then install VirtualBox and Vagrant on your Mac, or your windows, or even your Linux. And then, you can use my image that I prepared for you, that already comes with Terraform. The only thing that you need to do is to "git clone" this URL. You can also download a zip, if you just go to this URL, and you put this you reel in your browser. If you have Git installed, you can use "git clone" Once that is cloned, you will see that you'll have a "Vagrantfile", a "README.md", and a folder "scripts", with this "install.sh". This "install.sh" will install Ansible, and Terraform, and other useful software that you might need if you are in DevOps role. The only thing that you have to do now, when vagrant and VirtualBox are installed is you type, "vagrant up". And "vagrant up" is going to launch a ubuntu box and is going to preinstall some of the software for you. I'll just paused the video for a second, because "vagrant up" can take some time. And in the last lines are like "Successfully installed" and "Inflating: terraform" Then, you have this vagrant ubuntu image installed and Terraform is installed on it. If you have Linux or Mac you can just type, "vagrant ssh", if you have windows you might want to type, "vagrant ssh-config", which is just going to show you how to connect to this vagrant box. I have Mac, so I am going to use "vagrant ssh". If you have Windows, you can use something like "Putty" for instance. Then I'm going to type "terraform" and you see terraform installed. If you are in doubt whether to install it on the whole system or using Vagrant I would prefer Vagrant, because then your system should be identical to what I have.