Dashboard

Learn faster. Build smarter.

Back to Tools
Infrastructure as Code

Terraform

Terraform is one of the most important Infrastructure as Code tools in DevOps. It allows teams to define infrastructure declaratively, version it in Git, review changes with plan, and apply it consistently across environments.

IaCCloudProvisioning

Key Concepts

Terraform uses providers to interact with external APIs and platforms.

State files track real infrastructure and map it to code.

Modules help create reusable infrastructure patterns.

Plan and apply make infrastructure changes reviewable and predictable.

Common Interview Questions

What is the Terraform state file?

What is the difference between terraform plan and terraform apply?

Why should Terraform state be stored remotely?

Use Case

Use Terraform to define infrastructure in code and manage cloud resources in a repeatable way.

Common Use Cases

Provisioning VPCs, EC2, IAM, and cloud networking.
Creating reusable infrastructure modules for teams.
Managing cloud environments through Git-based workflows.
Automating infrastructure in CI/CD pipelines.

Pros

Supports multiple cloud providers and services.
Makes infrastructure reproducible and reviewable.
Strong ecosystem and community support.
Excellent for version-controlled infrastructure workflows.

Cons

State management introduces operational risk if handled badly.
Large codebases can become hard to manage without good module design.
Drift and provider behavior can sometimes be confusing.