“Are you new to Terraform and AWS CLI? Do you want to learn how to install and configure these powerful tools on your Windows machine? In this blog post, we’ll guide you through the process of installing Terraform and AWS CLI step-by-step. So whether you’re a beginner or an experienced developer, this guide is for you!”
Here are the key steps to install AWS CLI and Terraform on your Windows machine:
- Install AWS CLI and configure it with your access keys.
- Download the Terraform executable file and add it to your system’s path.
- Check the version of both AWS CLI and Terraform.
- Start creating resource files.
Installing AWS CLI in Windows
Here is a step-by-step guide to install AWS CLI on Windows:
- Open your favorite web browser and visit the AWS CLI page on the Amazon website.
- Navigate to the section labeled Window (right panel), and click the 64-bit hyperlink under Windows to download the latest MSI installer for AWS CLI. Downloading the latest MSI installer for AWS CLI 3.
- Once the download is complete, double-click on the downloaded file to start the installation process.
- In the installation wizard, click Next to proceed.
- Read and accept the license agreement by clicking on I accept the terms in the License Agreement checkbox and then click Next.
- Choose your installation location and click Next.
- Choose whether you want to install the AWS CLI for all users or just for your user account and click Next.
- Click Install to begin the installation process.
- Once the installation is complete, click Finish.
You can now use AWS CLI on your Windows machine.
Here is a link to a detailed guide with pictures that you can follow along with if you need more help.
Configuring AWS CLI in Windows
- Open a command prompt and type
aws configure
. - Enter your AWS access key ID and secret access key when prompted which you get after creating a new AWS user and go into security credentials inside the user and create access key.
- Choose a default region and output format.
- Press Enter to complete the configuration.
That’s it! You should now be able to use AWS CLI on your Windows machine.
If you need help please leave a comment and I can elaborate it more.
Installing Terraform exe and Configure the Path
Here is a step-by-step guide to install Terraform Mars exe on Windows with path configuration:
- Download the Terraform executable from the official website.
- Extract the executable to a directory of your choosing (for example, C:\terraform).
- Open the start menu, start typing environment and click Edit system environment variables.
- Click the Environment Variables… button.
- Select the Path variable in the System variables section to add terraform for all accounts.
6. Click New in the edit window and enter the location of the Terraform folder.
New Terraform path
7. Click OK on all windows to apply the changes.
You can now use Terraform Mars exe on your Windows machine.
Here is a link to a detailed guide that you can follow along with if you need more help.
Checking the versions of Terraform & AWS CLI
To check the version of AWS CLI, open a command prompt and type the following command:
aws --version
This will display the version of AWS CLI that is currently installed on your system.
To check the version of Terraform, open a command prompt and type the following command:
terraform --version
This will display the version of Terraform that is currently installed on your system.
Create Demo Resources using Terraform
Here is a simple example of how to create an IAM user using Terraform:
provider "aws" {
region = "us-west-2"
}
resource "aws_iam_user" "example" {
name = "example-user"
path = "/system/"
}
Here is a simple example of how to create an EC2 instance using Terraform:
provider "aws" {
region j= "us-west-2"
}
resource "aws_instance" "example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
tags = {
Name = "example-instance"
}
}t
Thank you for reading our guide on how to install Terraform and AWS CLI on your Windows machine. We hope you found this guide helpful and informative. If you have any questions or comments about this topic, please feel free to leave a comment below. And if you enjoyed this post, please give it a clap to show your support!