System Provisioning Management Tool
Tool: Terraform
Terraform is an open source tool that is used to automate the process on the cloud platforms(AWS ,Azure, etc. ).
It is an infrastructure as a code(IAAC) software tool. Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It has better workflow for writing and building infrastructure as a code. It is also a infrastructure provisioning tool used in 1099 companies reportedly in their tech stacks, including Uber, Instacart, and Slack.
For AWS cloud provisioning, we are going to use the terraform commands. Terraform code is written in terraform language with the extension .tf . Terraform prepares the whole infrastructure of the cloud service through its script files in a automate process on cloud. Terraform does it in a controlled manner, which is better than the manual one.
Installing Terraform:
1) Download terraform zip file from the following link:
https://www.terraform.io/downloads.html
2) According to the operating system you own, download the zip file and extract it in a folder.
3) Now go to file explorer-> right click on my PC->click on properties->Advanced system settings->Environment variables->system variables-> new-> Add variable name “path” and the enter the Value as the path of the folder where terraform.zip file is extracted-> Click Ok.
4) To check that the terraform is installed properly, enter the command “terraform -version” in your command prompt/power shell.
*Note: It is always better to use visual studio code(VSC) to perform terraform scripting. Install “Terraform” extension from the search bar. As it is easy to save the files in the expected path in “.tf” format and run the commands smoothly in the terminal.
For setting AWS Provisioning in system:
1. Download AWS CLI in your system from the following link:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
2. It will be installed in : C:\Program Files\Amazon\AWSCLIV2
3. Create a AWS account and sign up.
4. Sign in to the AWS console and click on your account name at the top->click on “My Security credentials”->Access keys-> Create a new access key-> download it.
5. Go to command prompt in the system, check AWS is installed properly or not with the command: aws — version.
6. Enter the command: aws configure. And enter the details of the key, region that you get in the download file.

Terraform files for AWS Cloud Provisioning:
Terraform files are written to create the following in the AWS cloud platform:
1) Create two T2 Micro EC2 Instances.

2) Create the vpn in the aws.

3) Creating a s3 bucket in the aws.

5 Main Terraform Commands for cloud provisioning:
1) Init: This command is used to initialize a working directory containing terraform configuration files (.tf files). It is the first command which runs all the terraform files that are present/created in the directory for creating/changing the cloud infrastructure.

2)Validate: This command is used to validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc. If there are any errors/syntax errors it shows as failure.

3)Plan: This command is used to create an execution plan. Terraform performs a refresh, unless explicitly disabled, and then determines what actions are necessary to achieve the desired state specified in the configuration files.

4)Apply: This command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a ”terraform plan” execution plan. If there is any error in the files/improper regions are set-upped, then it shows an error.


5)Destroy: This command is used to destroy the Terraform-managed infrastructure.

6)Version: This command is used to know the version of the terraform that we have installed.

To gain more knowledge on the terraform commands, visit: