Terraform
2 min read

What is Terraform? Terraform is an infrastructure as code (IaC) tool that allows you to create, manage, and update infrastructure resources such as virtual machines, networks, and storage in a repeatable, scalable, and automated way.
Task 1: Install Terraform on your system.
sudo apt update
sudo apt upgrade
#wget from url
wget https://releases.hashicorp.com/terraform/1.0.9/terraform_1.0.9_linux_amd64.zip
sudo apt install unzip
#unzip it
unzip terraform_1.0.9_linux_amd64.zip
sudo mv terraform /usr/local/bin/
#verify the version
terraform version
Task 2: Answer the below questions
Why do we use terraform?
Terraform is a popular infrastructure as code (IaC) tool used for automating the deployment and management of cloud resources and infrastructure. It allows you to define your infrastructure in code, typically using a declarative configuration language, and then provision and manage that infrastructure in a consistent and repeatable manner.
What is Infrastructure as Code (IaC)?
Infrastructure as Code (IaC) is a software engineering practice that involves managing and provisioning computing infrastructure using machine-readable configuration files or code, rather than manual processes. With IaC, you represent your infrastructure—servers, networks, storage, and other resources—using code that can be version controlled, reviewed, and automated.
What is a Resource?
A resource refers to any entity or component that is managed by an IaC tool to create, configure, or manage a specific piece of infrastructure. Resources represent the various components that make up your infrastructure, such as virtual machines, databases, networks, storage buckets, security groups, load balancers, and more.
What is Provider?
In the context of Infrastructure as Code (IaC) tools like Terraform, a provider is a plugin or an interface that allows the IaC tool to interact with a specific cloud or infrastructure platform. Providers enable IaC tools to manage resources and services offered by various cloud providers, on-premises data centers, or other infrastructure platforms.
What is the State file in Terraform?
In Terraform, the state file is a crucial component that keeps track of the current state of your infrastructure. It is a JSON-format file that contains metadata and information about the resources you have defined and managed using Terraform. The state file serves as a record of the real-world resources created in your cloud provider or infrastructure platform based on your Terraform configuration.
Happy Learning!!