Terraform is code for creating, modifying, and deleting infrastructure on the cloud. The terraform code can be dry run in the Visual Studio Code editor (VSC) before you apply it to the cloud environment such as AWS/AZURE/GC.
Dry run of Terraform codes
#1 Install Terraform
Download the terraform for Windows from the download link. Copy the terraform.exe to the C drive folder (create a folder) C:\Terraform, and set the .exe file path in Environment variables.
# 2 Install Visual studio code editor
The steps to install it are explained in my previous post. Follow the same.
#3 Install the extension for Visual studio code
Go to the download link and install it and open the same in the VSC.
#4 Verify Terraform installation
Open the VSC editor and terraform file folder. Consequently, it initiates Terraform environment. To check for terraform installation, open the command prompt (cmd) and issue the below command:
#5 Open Visual Studio Code editor
Open the VSC editor and terraform file (extension is .tf). And click on the Terminal button, and start issuing the below commands:
terraform init terraform plan
And, if there are no errors, run the below command, which applies changes to the cloud environment.
To sum up, these steps are helpful to do a dry run on your terraform code.
You must be logged in to post a comment.