Terraform Concept

Terraform is an open-source infrastructure as code(IAC) software from Hashicorp Company. Terraform software written in GO programming language.
IAC is all about writing code that describes your infrastructure.
In Terraform, for creating the infrastructure we use HCL (Hashicorp Configuration Language)
Using Terraform you can create AWS resources, S3 buckets, security groups, etc. so basically you can create one complete computer called infrastructure.
In Ansible also we are using one concept called IAC. But in Ansible you have to write one YAML file that creates your code into infrastructure. That infrastructure is nothing but creating files and folders, installing software, removing software, etc.
IAC is same in Ansible and Terraform but the way is different.
IAC:- Provisioning infrastructure using scripts/tools instead of manually configuring machines.
Where, Provisioning Means:- Creating
Updating
Deleting
Using GUI also you can create EC2 instances, S3 buckets or complete computers but in the real world or most companies, we have to use Terraform software or tool.
Terraform is a software that enables you to create, change and delete infrastructure safely and efficiently.
Terraform supports all cloud providers.
Terraform provides a consistent CLI (Command Line Interface) workflow to manage hundreds of cloud services.
The infrastructure Terraform can manage components such as compute instances, storage, networking, etc.
Where, compute instances = Creating a computer
Install Terraform on windows:
https://www.terraform.io
Download Terraform software.
Extract the downloaded zip file.
Add Terraform path to system environment variables.
Command:- terraform --version
terraform --help
Step 1:- Go to the Download option

Step 2:- Click on Windows and download AMD64 version.

Step 3:- Create one Terraform folder in C Drive and extract the downloaded zip file


Step 4:- Check on the windows command prompt if it is working or not.


Please check properly in the above command prompt that the path is
"c:\terraform\terraform_1.4.2_windows_amd64"
Now I want to run commands present in other than above path. I am getting some errors. Please check below.

In this time you have set system environment variables. You can run commads from any location.
Go to system environment variables and then click on PATH and edit it.


Save the above path in edit environment variables. Now your system environment variables process is done successfully.
Now you are able to run commands from any location.


