DEV Community

Winnie Wambui
Winnie Wambui

Posted on

Step-by-Step Guide to Setting Up Terraform, AWS CLI, and Your AWS Environment

Introduction

Setting up your environment correctly is the foundation of working with Terraform. In this guide, I’ll walk through how I installed Terraform, configured the AWS CLI, and connected everything to AWS.

1. Setting Up AWS

  • Created an AWS account
  • Enabled MFA for security
  • Created an IAM user with programmatic access
  • Attached necessary permissions

2. Installing AWS CLI

Installed AWS CLI and configured it:

AWS CLI Setup


3. Installing Terraform

Downloaded and installed Terraform, then verified:

Terraform Version


4. Connecting Terraform to AWS

Terraform automatically uses AWS CLI credentials.

Tested connection using:

AWS Identity

VSCode Extensions

I installed the following extensions in Visual Studio Code:

  • HashiCorp Terraform
  • AWS Toolkit

Conclusion

By completing this setup, I now have a fully working environment ready to deploy infrastructure using Terraform.

Top comments (0)