Introduction
Terraform is used to deploy instances using Infrastructure as Code (IaC). Most companies use Terraform for automation; in this article, we will learn how to set up Terraform on our computers to start the coding.
Step 1. Install the Terraform on your computer. To download the Terraform, click here.
Step 2. We have to create a folder to move the "terraform exe fil", so create a folder on the C drive (terraform), Extract the downloaded file, and copy the terraform exe file to terraform folder.
Step 3. To locate the terraform executable file, we must add the variables path. On the "Advanced system setting", open the"Environment Variable", double-click the"pat" variable, click " Ne", enter the location (C:\terraform), and click "O".
Step 4. To verify the Terraform version, open the CMD on the Terraform folder and type"“terraform -versio"
Step 5. Go to the Visual Studio Code website and download the""Visual Studio Cod". To download the Visual Studio Code, Click here.
Step 6. Open the Visual Studio Code, navigate to the "Extension", and type "terrafor".
Step 7. Install "HashiCorp Terraform" and "Azure Terraform".
Step 8. On the Visual Studio Code, go to the "Fil" menu, click "Open folde", select the "Terraform exe folde", and click"Select Folde".
Step 9: The "terraform.ex" is added to the Visual Studio Code, so we can now create the "Terraform files (.tf".
Step 10. On the Visual Studio Code, click "New File Ico".
Step 11. Type the name as "mai", including the extension as ".tf (main.tf", and hit enter.
Step 12. The Visual Studio Code is accepted in the Terraform files.
Summary
In this article series, we will learn how to deploy an Azure infrastructure using Terraform, and in this article, we will learn how to set up Terraform on our computers.