Thursday, November 14, 2019

Install Terraform Extension in VS Code for Azure


Install Terraform Extension in VS Code for Azure

Image
MicrosoftLovesTerraform
In the previous article we have gone through with how to install and configure Terraform for azure. 
Refer : INSTALL TERRAFORM FOR AZURE PROVIDER OR WINDOWS 10
Now within this article I’ll be focusing how can we increase productivity after installing certain terraform extension in VSCode.
Step1. Install VSCode from the provided link
Step2: After installing VSCode , open that and search for extension option exist on the left side of screen as depicted below  refer image extension.jpg
VSCode Extension


















Once you click on that in search bar type “Terraform”, you will get enough extensions and few of them which I used for my purpose are mentioned below:
Step3: Azure Terraform: The VSCode Azure Terraform extension is designed to increase developer productivity authoring, testing and using Terraform with Azure. The extension provides terraform command support, resource graph visualization and CloudShell integration inside VSCode.
Which allows you to execute following command from VSCode terminal as shown below in screenshot : Refer azure-terraform.jpg
Azure Terraform
Step4:Terraform: Syntax highlighting, linting, formatting, and validation for Hashicorp's Terraform.

Step5:Terraform: its by Anton Kulikov ,This is visual studio code extension ,adds syntax support for the terraform configuration language.











Once you have installed all of them and see the structure of your files it will have pretty impressive icon on the left side and intellisense will start working as shown below in screen shots.
Refer an images  icon.jpg and intellisense.jpg respectively.










I believe an article will help you to start with terraform with VSCode.
In the upcoming article we’ll learn how can we create Service Principal in Azure to start with Terraform authentication.



Monday, November 11, 2019


Install Terraform for Azure Provider or on Windows 10



Terraform has been well known open-source infrastructure as code software tool created by HashiCorp , which enables users to define and provision a datacenter infrastructure using a high-level configuration language known as Hashicorp Configuration Language, or optionally JSON.
To install Terraform on windows 10 machine there are some simple steps you have to proceed with to get it done.

In the following article we will be focused around that.
Kindly open the following link in you browser and go to bottom to download it for windows https://www.terraform.io/downloads.html
Though there will be various option available , but you choose an option to go with Windows 64 bit for windows 10.

 





















Once you have download that (in my case: terraform_0.12.13_windows_amd64)
Just extract that and place in your desired drive like I have put it in C drive as shown below:





Windows 10 and Windows 8
1.     Go to Control Panel
2.     Click the Advanced system settings link or Search Advanced system settings in search. Refer advance-settings.jpg
3.     Click on Environment Variables  In the section System Variables, find the PATH environment variable and select it. After that click on Edit and enter the value as shown in image env_varibale.jpg
4.     In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.

img-advance-settings.jpg

 img env_varibale.jpg






















Now you are done with the environment path setup, now open PowerShell command window to verify about the terraform version.
Kindly type the following command to verify that: terraform -version
Refer an image below powershell_terraform.jpg







We are done with an installation, now in upcoming articles we will understand how Terraform works with Azure provider and how can we authenticate azure resource provide to create azure resources.