What is Terraform


Terraform is an open-source Infrastructure as Code (IaC) tool created by HashiCorp that allows you to provision, manage, and automate infrastructure across various cloud providers, on-premises environments, and third-party services.
Terraform uses declarative configuration files written in HCL (HashiCorp Configuration Language) to define the desired state of infrastructure. It then automates the process of creating, updating, and managing resources to match that state.
Core Features:
Multi-Cloud Support: Works with AWS, Azure, GCP, Oracle Cloud, VMware, and more.
State Management: Tracks resource states through a state file to ensure consistency.
Declarative Approach: Focuses on defining what infrastructure should look like rather than how to provision it.
Modularity: Supports reusable modules for scalable and maintainable infrastructure code.
Idempotent Execution: Terraform ensures the same result, even when applied multiple times.
What Terraform Does:
Automates infrastructure provisioning (e.g., VMs, networks, databases).
Manages multi-cloud environments with a single tool.
Enables version control of infrastructure using code.
Provides a preview of changes before applying them with
terraform plan
.Applies changes to infrastructure with
terraform apply
.
How It Works:
Write: Create configuration files defining infrastructure resources.
Plan: Preview changes to see what Terraform will create or update.
Apply: Deploy the changes to provision infrastructure.
Manage: Use Terraform to update, destroy, or modify infrastructure.
In the next blog, we’ll go through deploying a basic server using Terraform code (HCL)
Subscribe to my newsletter
Read articles from CHARAN directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by