In this blog post, we will learn how to install the latest version of Terraform on Linux ubuntu with the Terraform CLI auto-complete.
In my case, I am using Ubuntu20.x running on WSL. I prefer to use the WSL shell and not PowerShell because it gives me the auto-complete feature for many CLI tools like Kubectl.
The commands below will install the latest version of Terraform and the auto-complete for Terraform CLI.
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" apt-get update && sudo apt-get install terraform terraform -install-autocomplete
At this stage, the installation is completed. To get started to start a new terminal session for the auto-complete to load and work.
Parts of this blog post was first published on our sister site https://www.ntweekly.com