Terraform is an infrastructure as code tool that lets you define cloud and on-premises resources in declarative configuration files. Terraform Core reads your configuration, talks to provider plugins, compares the desired state with the recorded state and produces an execution plan, which it then applies to create, change or destroy resources.

This collection of tutorials and examples starts with the basic init, plan, apply and destroy workflow and an architecture diagram of Terraform's components. It then works through the concepts you use every day: input and environment variables, interpolation, passing outputs between modules, and the role of terraform.tfstate and its backup file. Reference posts explain commands such as taint and untaint, and lab-ready example code covers AWS VPCs, security groups, instances and provisioners.

Beyond the basics, there are guides to code quality and day-to-day operations, including linting with TFLint, setting up pre-commit hooks with security scanners, and running Terraform behind an HTTP or HTTPS proxy. Beginners can follow the guides in order, while engineers already running Terraform can use the posts as quick references and as a source of interview preparation.

Start here

Latest Terraform articles

Terraform Variable Example: Azure & AWS

This page shows how to declare and use Terraform input variables of type number, string, bool, list and map with AWS and Azure resources. Below the original…

Read More

Terraform dynamaic block details explaination with example

A Terraform dynamic block generates repeated nested blocks inside a resource, data source, provider or provisioner, such as ingress rules in a security group or rule blocks…

Read More

Terraform: Azure VM using terraform-azurerm-compute Module

The example above uses the community Azure/compute/azurerm and Azure/network/azurerm Terraform modules to build one Linux VM and one Windows VM in Azure. Both share a virtual network…

Read More

Terraform: Azure VM using virtual-machine Module

This tutorial uses the community kumarvna/virtual-machine/azurerm module from the Terraform Registry to deploy two Windows Server 2019 VMs into an existing Azure resource group, virtual network and…

Read More

Terraform: Create Azure Windows VM with file, remote-exec & local-exec provisioner

This page shows how to create an Azure Windows Server VM with Terraform and run all three provisioner types on it: file copies a script to the…

Read More

Terraform Error Handing with Try Catch

Terraform has no try { } catch { } block. Error handling in HCL uses the try() function, which returns the first of its arguments that evaluates…

Read More

kapitan Command line reference

Kapitan is an open-source tool that generates Kubernetes manifests, Terraform JSON, scripts and documentation from one hierarchical inventory, using Jsonnet, Jinja2, Kadet or Helm templates. The help…

Read More

Terraform: Example Code for Create Multiple Azure Linux Vms

This page shows how to create several Azure Linux virtual machines from one Terraform configuration by using the count meta-argument. The VMs sit behind a load balancer…

Read More

Debugging Terraform + Helm Drift on EKS: Failure Behaviours and Fixes

A field tutorial based on a real incident removing a stale CriticalAddonsOnly toleration from metrics-server and KEDA on EKS Auto Mode clusters managed by Terraform Cloud (TFC) + the eks-blueprints-addons module. TL;DR We tried to…

Read More

How to Configure pre-commit for Terraform: Complete DevOps Guide with 15 Practical Use Cases, Commands, Security Checks, and Best Practices

Terraform pre-commit Hooks: Installation, Configuration, TFLint, Trivy, Checkov & CI/CD Guide Learn to configure pre-commit for Terraform with step-by-step commands, terraform fmt, validate, TFLint, Trivy, Checkov, terraform-docs,…

Read More

Terraform Tools for Developer Productivity Master Guide

Tools, Workflow, Security, Testing, CI/CD, Automation, AI Assistance, Governance, and Production Best Practices Verified baseline: 5 September 2026Audience: Terraform developers, DevOps/SRE, platform/cloud engineers, module authors, DevSecOps teams, and engineering…

Read More

HCP Terraform (Terraform Cloud) — Complete Guide to Variables, Scope & Precedence

Updated: October 2026 | Based on current HashiCorp documentation HCP Terraform provides several ways to pass values to Terraform code. These include variable defaults, .tfvars files, environment…

Read More

Terraform Cloud (HCP Terraform) — Organization, Project, Workspace, Team & User Mapping

Updated: October 15, 2026 | Based on current HashiCorp documentation Terraform Cloud is now called HCP Terraform. Its architecture separates infrastructure organization from user access management (RBAC)….

Read More

Terraform Cloud vs Terraform Enterprise

Terraform Cloud (now called HCP Terraform) and Terraform Enterprise (TFE) are HashiCorp’s infrastructure automation platforms. The primary difference is their deployment model: Both provide Terraform state management,…

Read More

Terraform Conditional Expressions and Logic: Complete Guide with Examples

Terraform Conditional Expressions and Logic — Summary Table # Concept Purpose Example Creates Resources? 1 Ternary operator Choose between two values var.env == “prod” ? “t3.large” :…

Read More

Terraform Loops and Iteration: Complete Guide to count, for_each, for Expressions, and Dynamic Blocks

Terraform Loops and Iteration — Summary Table # Option / Method Purpose Input Common use case Creates resources? 1 count Repeats a resource or module a specified…

Read More

Terraform Architecture and Components through diagram

Terraform Architecture & End-to-End Workflow This reference architecture covers the standard Terraform CLI workflow, including execution from a developer machine or CI/CD runner. It shows the relationship…

Read More

Terraform workspace explained!!!

What is Terraform workspace? Have you worked with terraform workflow? such as terraform init/plan/apply/destroy with terraform configuration file? If Yes, you already have worked with Terraform workspace….

Read More

Terraform Tutorials: Templating in Terraform

Top 10 Templating Engines Across Major Programming Languages # Templating Engine Programming Language Common Framework / Ecosystem Typical Real Use 1 Jinja2 Python Flask, Ansible HTML generation,…

Read More

Terraform Backend Tutorial

Terraform is a popular open-source infrastructure as code tool used to create and manage infrastructure resources. The state of the infrastructure resources managed by Terraform is stored…

Read More

Terraform provisioners Tutorials and Complete Guide

Terraform provisioners are used to execute scripts or shell commands on a local or remote machine as part of resource creation/deletion. They are similar to “EC2 instance…

Read More

Complete Guide to HashiCorp Terraform Certification

Hashicorp Terraform is understood as the standard tool for managing modern cloud environments through code. It is defined as a software that allows for the creation and…

Read More

Terraform: Step‑By‑Step: Use Local CLI to Modify Remote State in TFE

Below is a step‑by‑step tutorial for using the Terraform CLI against a VCS‑connected HCP/TFE workspace, plus a command catalog for all the common remote actions. Step‑By‑Step: Use…

Read More

AWS EKS: How to enable Auto Mode using Terraform?

Let’s clarify the reality for July 2026: EKS “Auto Mode” vs. “Karpenter Auto Compute” in Terraform 1. The Real EKS Auto Mode (Serverless) 2. cluster_compute_config in terraform-aws-modules/eks…

Read More

Terraform: Checklist: What to Check When Renaming HCP Terraform Organization

That summary is exactly right—and the impact is important to understand before proceeding. Here’s a complete impact checklist and guidance for what you need to check/update if…

Read More

Kubernetes: Deploying AWS Load Balancer Controller with Terraform

Absolutely, deploying the AWS Load Balancer Controller (ALB Controller) in production via Terraform is now a very common, robust, and recommended practice. There are official Terraform modules…

Read More

Terraform source for Modules from Git: All Patterns & Examples

Here’s a comprehensive tutorial on all valid Terraform module “source” Git URL patterns, with clear examples (no Drivemode references), so you can master using modules from GitHub,…

Read More

Terraform tfenv Tutorial: From Basic to Advanced

What is tfenv? tfenv is a Terraform version manager that allows you to easily install and manage multiple versions of Terraform on your system. You can switch…

Read More

Terraform Tutorias: CLI environment and predefined/meta variables Complete Reference

Terraform CLI environment variables reference Environment Variable Description Example Usage TF_LOG Controls logging verbosity. Values: TRACE, DEBUG, INFO, WARN, ERROR, OFF. export TF_LOG=DEBUG TF_LOG_PATH Specifies log file…

Read More

Terraform Tutorials: Local Values using Local Block

What is local value in terraform? In Terraform, a locals block is used to define local variables within a module, allowing you to create reusable expressions and…

Read More

Terraform: frequently asked questions

What is the terraform.tfstate file?

It is a JSON file that maps your configuration to the real resources Terraform manages, and Terraform uses it to work out what needs to change. Teams usually store it in a remote backend with locking, and terraform.tfstate.backup holds the previous version.

What is the basic Terraform workflow?

Run terraform init to download providers and set up the backend, terraform plan to preview changes, and terraform apply to make them. terraform destroy removes the managed resources.

Is terraform taint still used?

terraform taint marks a resource to be recreated on the next apply. Newer Terraform versions recommend terraform apply -replace=ADDRESS instead, because it shows the replacement in the plan before you apply it.

How do I use Terraform behind a corporate proxy?

Set the HTTP_PROXY and HTTPS_PROXY environment variables (and NO_PROXY where needed) before running Terraform. Provider downloads and API calls will then go through the proxy.