← Back to blog
Infrastructure
Terraform Infrastructure as Code
Jun 25, 2025•10 min read
Infrastructure as Code (IaC) is a best practice for managing cloud resources.
What is Terraform?
Terraform is an open-source IaC tool that allows you to define infrastructure using declarative configuration files.
Benefits of IaC
- Version control for infrastructure
- Reproducible deployments
- Infrastructure documentation
- Team collaboration
- Disaster recovery
Basic Terraform Workflow
- Write configuration files (.tf files)
- Initialize Terraform:
terraform init - Plan changes:
terraform plan - Apply changes:
terraform apply
Example
resource "aws_instance" "web" { ami = "ami-0c55b159cbfafe1f0" instance_type = "t2.micro" tags = { Name = "web-server" } }
Terraform makes infrastructure management predictable and scalable.
Written by
Sujata Dahal