Terraform is an Infrastructure as Code (IaC) tool from HashiCorp, and it is an open-source, cross-platform and multi-cloud infrastructure deployment tool. It uses HashiCorp Configuration Language (HCL) and supports all popular cloud service providers.
Terraform comes as a single binary in a zip archive, you need to download it from the terraform official download page, extract the archive and you can use it without having it installed and you can also use chocolate package provider to download the terraform. To use the binary globally you need to set the binary location to the PATH.
Alternatively, the PowerShell script below does all these steps for you and make it ready to run your terraform deployments…
You can run this function any number of times, if terraform is not configured it will download and configure the path, if it is already there it will replace/upgrade with the latest version.
You can visit terrafrom docs to start with terraform.
To start with Azure deployments using terraform you can visit Microsoft Docs.