DEV Community

Ejibode Ibraheem
Ejibode Ibraheem

Posted on

Step-by-Step Guide to setting Up Terraform, AWS CLI, and VS Code

In this article, I am going to work you through how you can set up Terraform, AWS CLI, and VScode. I assumed you already have an AWS account.
If your operating system is macOS, and you have homebrew installed, you can run these commands:
brew tap hashicorp/tap
brew install hashicorp/tap/terraform

On Windows, if you are Chocolatey user, you can run:
choco install terraform

If you wish, you can install Terraform manually by going to the Terraform homepage,download the ZIP archive for your operating system and unzipping it into the directory where you want the terraform to be installed.
To confirm if the Terraform is correctly installed, run this command:
terraform

terraform-install

For the Terraform installed to be able to communicate with AWS, AWS credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) for the IAM user you created will be needed.If you are on Unix/Linux/macOs terminal run:
export AWS_ACCESS_KEY_ID=(your access key id)

export AWS_SECRET_ACCESS_KEY=(your secret access key
If you are on Windows, run:
set AWS_ACCESS_KEY_ID=(your access key id)
set AWS_SECRET_ACCESS_KEY=(your secret access key)

To install VS Code, install vscodeclick on the link, and follow the process to end.

Top comments (0)