In this blog post, I will show you how I 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.