Installing Terraform on Ubuntu

Welcome to an ongoing series of Terraform tips, tricks, and tutorials. On this journey we are going to look at what it takes to use Terraform to manage resources running in VMware, Azure, AWS, and Google cloud. We will look at the differences between running Terraform on Linux and Windows and show examples of both. The assumption is that you know what Terraform is and just need to know how to do things with it. In a previous blog, we discussed how to install Terraform on Windows. In this blog we will look at installing Terraform on an Ubuntu 18 server.

For these examples we will use a VMware generic deployed instance so that we can go back to the same system and build upon the previous posting of how to do something. For this example we install a generic Ubuntu 18.04.5 desktop instance. We could just as easily have done this from a server instance and done everything from the command line using wget to get the Terraform binary.

Rather than using the wget command and having to figure out which version of Terraform to download we use the Firefox browser and go to http://terraform.io to download the binary.

If you forget the Terraform website you can easily do a search for the term terraform download ubuntu which returns a variety of tutorials and the HashiCorp Terraform site. Scrolling down on the site we see a variety of operating systems that are supported for the Terraform platform. Select the Linux 64-bit from the list to download.

Once the download is finished we need to unzip the binary from the zip file. Prior to unzipping the file we need to install the unzip package. This is done on Ubuntu with the apt-get command

sudo apt-get update

sudo apt-get install wget unzip

The update command makes sure that all patches and updates are installed. The install command makes sure that the wget (which is not necessary for this example) and unzip are installed. Once the unzip command is installed execute the unzip command to extract the terraform binary.

unzip terraform_0.13.4_linux_amd64.zip.

The askubuntu website has a good cookbook on how to perform this installation and testing of the binaries.

The last step to getting Terraform installed on Ubuntu is to place the terraform binary in the path of the current user. Rather than placing this in a user specific bin directory it is best practice to put binaries like this in /usr/local/bin to be used by automation scripts and other users on this system. We can either copy or move the binary to this location using the sudo command to write to a root protected directory.

sudo mv terraform /usr/local/bin

Once the binary is relocated we can test the terraform binary by typing

terraform version

terraform

These commands not only test the binary but test that the binary is in the proper path to be executed.

At this point we have a terraform development platform that can be used to provision systems and services on a wide variety of cloud and virtualization platforms. To see this process in action, watch a video capture of this procedure.

In summary, installation of Terraform on Ubuntu is relatively simple. The three minute video shows everything required from start to finish to get a Terraform platform configured to be used from a terminal.

some additional blogs for a different perspective

357 thoughts on “Installing Terraform on Ubuntu”

  1. A lot of thanks for all your valuable effort on this website. Betty take interest in managing investigation and it’s easy to understand why. My spouse and i learn all relating to the powerful manner you convey valuable secrets through this web blog and as well foster participation from people on the point and our own daughter is actually learning a lot of things. Take pleasure in the rest of the year. You are performing a fantastic job.

  2. I want to show my thanks to you for rescuing me from this predicament. Just after looking out throughout the online world and obtaining basics that were not beneficial, I was thinking my entire life was done. Being alive minus the answers to the issues you have resolved all through your entire posting is a critical case, as well as ones which may have in a negative way affected my career if I had not noticed your site. Your own personal understanding and kindness in playing with a lot of stuff was helpful. I’m not sure what I would have done if I had not encountered such a stuff like this. I can at this time look forward to my future. Thank you very much for your expert and amazing guide. I will not think twice to suggest your blog post to anyone who needs care about this situation.

  3. I as well as my friends happened to be examining the excellent information and facts on your web site and so all of the sudden I got a terrible feeling I had not expressed respect to the blog owner for those tips. Most of the ladies became as a consequence joyful to see them and already have seriously been enjoying these things. I appreciate you for really being well kind and then for picking varieties of remarkable tips most people are really desperate to be aware of. My sincere regret for not saying thanks to you sooner.

  4. I wanted to draft you that very little remark to help say thanks once again for your striking tips you have documented on this site. It has been so shockingly generous of you to grant openly all numerous people would’ve marketed as an electronic book to help with making some money for their own end, especially seeing that you could have tried it in the event you considered necessary. These tips also worked to provide a good way to know that many people have similar interest similar to mine to know the truth very much more with regard to this condition. I think there are thousands of more enjoyable moments ahead for individuals that read your site.

  5. I enjoy you because of your entire effort on this web site. Ellie take interest in engaging in investigations and it is simple to grasp why. Many of us know all about the lively medium you produce both useful and interesting things via the web blog and therefore inspire participation from the others on this concern then our daughter is in fact understanding a whole lot. Take advantage of the rest of the new year. You have been conducting a fabulous job.

  6. I simply wanted to thank you so much yet again. I do not know the things I would have accomplished without the opinions documented by you about that situation. Completely was a real intimidating scenario in my opinion, but viewing the very skilled manner you handled that forced me to leap with gladness. I am just happy for your help and in addition wish you find out what an amazing job you happen to be undertaking teaching some other people thru your web blog. I know that you have never encountered all of us.

  7. I needed to draft you the very small word so as to thank you so much once again on the remarkable tricks you’ve featured on this page. It is certainly remarkably generous of people like you to supply freely precisely what a few people might have offered as an electronic book to help with making some profit on their own, precisely since you might have tried it in case you considered necessary. The smart ideas additionally acted to be the good way to fully grasp most people have a similar dreams much like mine to see a great deal more in regard to this problem. Certainly there are numerous more fun times up front for folks who looked at your blog.

  8. I needed to write you that little bit of remark to say thanks yet again for your personal marvelous basics you’ve discussed on this site. It’s really unbelievably open-handed with people like you to allow publicly what exactly a number of us could have advertised for an electronic book to end up making some cash for themselves, and in particular now that you could possibly have tried it if you ever decided. The inspiring ideas also served to become fantastic way to understand that other people have the same interest really like my own to learn a great deal more when considering this problem. I’m sure there are millions of more pleasurable sessions in the future for those who go through your blog.

  9. Needed to post you one bit of word to finally thank you so much again with your wonderful advice you have shown here. It was certainly seriously open-handed of people like you giving without restraint exactly what a lot of people could have sold for an e-book to make some profit for themselves, primarily considering the fact that you might have done it in case you desired. These advice likewise served to be the easy way to fully grasp that other people have a similar dream really like mine to know the truth way more around this condition. Certainly there are many more enjoyable instances in the future for individuals that looked over your blog post.

  10. I would like to convey my appreciation for your kind-heartedness giving support to men and women who have the need for assistance with this important niche. Your very own commitment to getting the solution all around turned out to be certainly useful and have specifically helped girls like me to arrive at their pursuits. Your entire valuable guideline means a whole lot a person like me and still more to my office colleagues. Thanks a lot; from all of us.

  11. I wish to point out my respect for your kindness supporting men and women who have the need for guidance on this question. Your personal commitment to getting the message all over appeared to be unbelievably useful and has really encouraged somebody like me to get to their ambitions. Your warm and friendly facts entails much to me and further more to my mates. Thanks a ton; from all of us.

  12. I definitely wanted to post a brief note to be able to say thanks to you for some of the splendid tips and hints you are posting on this site. My time consuming internet search has finally been recognized with good concept to go over with my companions. I ‘d tell you that we website visitors are extremely fortunate to live in a fabulous place with many special individuals with good tactics. I feel somewhat lucky to have encountered the web site and look forward to many more excellent times reading here. Thanks once more for a lot of things.

  13. I intended to draft you one tiny observation to give many thanks once again with your pretty techniques you’ve documented at this time. This is strangely open-handed of you to provide openly what exactly most people would have marketed for an e-book to get some cash on their own, precisely given that you could possibly have done it if you decided. Those creative ideas additionally acted as the good way to know that the rest have the same fervor the same as my very own to know lots more when it comes to this issue. I believe there are millions of more fun times ahead for people who go through your blog.

  14. I have to get across my gratitude for your kindness supporting men and women that actually need assistance with that theme. Your special commitment to getting the solution across appears to be incredibly practical and have regularly enabled guys and women much like me to realize their targets. Your new useful help and advice implies so much to me and further more to my colleagues. Thanks a ton; from everyone of us.

  15. I intended to put you this very little remark to help give many thanks the moment again just for the precious tips you’ve contributed on this page. This is really pretty open-handed of people like you to grant freely what a number of people would have distributed for an e-book to help with making some cash on their own, mostly considering the fact that you might well have tried it if you wanted. These strategies in addition acted like a easy way to fully grasp that the rest have similar eagerness similar to my personal own to know more and more when considering this condition. I believe there are many more fun opportunities up front for individuals that browse through your blog.

Leave a Reply

Your email address will not be published. Required fields are marked *