1) Install Terraform on your machine

You can find the installation tutorial here : https://learn.hashicorp.com/tutorials/terraform/install-cli

2) Install jq on your machine

If you are on linux you can install jq as follows :

sudo apt update
sudo apt install jq -y

3) Install aws-vault on your machine

In order to be able to manage AWS credentials efficiently and securely on your work environment, we use aws-vault. It must therefore be installed. You can find the installation explanations here: https://github.com/99designs/aws-vault#installing

4) Install boto on your machine

The terraform scripts run from time to time Python scripts to overcome native bugs of AWS or terraform. It is therefore necessary to install a small library that is used in one of the modules.

pip install boto3

5) Install AWS-CLI on your machine

curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

6) Install the infracost cli on your machine

It is possible to install infracost simply by following the following documentation : https://www.infracost.io/docs/

To test that the cli works well, you can run the following command :

infracost --version

7) Setup local configuration for AWS

Assume that you have installed aws-vault, you will then be able to store AWS credentials in local machine.

First, run this command in the terminal: