Terraform is an infrastructure as code (IAC) tool that enables us to define and manage infrastructure resources in a declarative way, making it easier to automate the provisioning, deployment, and management of our cloud resources. With Terraform, we can easily and consistently create and manage our Azure infrastructure resources, such as resource groups and VMs, among others.
Virtual Machine (VM) provisioning on Azure can be a seamless process when leveraging Terraform, an Infrastructure as Code (IaC) tool. This article guides you through the quick and efficient steps to create a VM on Azure using Terraform.
Step 1; Install terraform Software
On the web browser, download Terraform and install window AMD64
Locate the terraform folder, unzip it
Extract the file
Highlight and copy the location terraform text
Search environmental variable at the left lower search bar
Click environmental variable
Click on path
Click on edit
Click on new to create a position to paste the copied terraform text
Click OK
Open the terminal of Vscode and input the terraform space dash version
Create a new terraform Configuration file
In the Vscode, open a file (terraform)
In the working directory create a file main.tf and paste the terraform configuration on it
Save the file
Initialise and apply Terraform configuration
In the Git bash, run the following command to initialise the Terraform configuration: terraform init
I will continue later. This prompt is saying ;
the directory has no terraform configuration files
Top comments (0)