Monday, May 31, 2021

Install Terraform in Windows 10. How to Configure Visual Studio Code for Terraform to work with AWS

 Description: Here I have explained, How to install Terraform in Windows 10 and configure VS Code for Terraform to work with AWS.

How to Install Terraform in Windows 10?

Below is the procedure to install terraform in windows 10

  • Download Terraform from Download URL
  • Once the Zip file downloaded extract it to C:\Terraform
  • Add path in System Variable path as follow

Under system Variable -- Path [ Add New path C:\Terraform]




  • After add path in the environment variable. Open Powershell and verify the version by using the below command
      terraform --version


How to Configure Visual Studio Code  for Terraform to work with AWS?

  • Download Visual Studio From the Download URL and install it
  • Launch Visual Studio Code and Navigate to Extension Short Cut on the left panel. Search for terraform 

  • After installation, you can use VS Code for AWS 
  • Login to AWS account for terraform
  • Create a file with name main.tf with the below code, make sure to change your value with given in below code

provider "aws" { access_key = "AKIAU4DZPCIQTAZ2JKXV" secret_key = "3i0AAfPJvMkKAA6JeCG8Z793BfaWCji0SjH81uRw" region = "us-east-1" }
  • After creating the file open the terminal and run terraform init command 




  • Apply terraform project 


No comments:

Post a Comment