🏗️
Top 45 Terraform / IaC Interview Questions & Answers (2026)
45 Questions
20 Beginner
15 Intermediate
10 Advanced
About Terraform / IaC
This technology is widely used in software development and is a frequent topic in technical interviews at companies of all sizes.
What to Expect in a Terraform / IaC Interview
Interviews cover both foundational concepts and practical application of this technology, with questions ranging from definitions to architectural decision-making.
How to Use This Guide
Work through questions in order of difficulty to build your understanding progressively. Bookmark challenging questions and revisit them before your interview.
Curated by Tech Baithak Editorial Team · Last updated: May 2026
Beginner
20 questions
Core concepts every Terraform / IaC developer must know.
01
What is Infrastructure as Code (IaC)?
02
What is Terraform?
03
What is HCL (HashiCorp Configuration Language)?
04
What are the main Terraform commands?
05
What is Terraform state?
06
What is a Terraform Provider?
07
What is a Terraform Resource?
08
What are Terraform Variables?
09
What are Terraform Outputs?
10
What is a Terraform Module?
11
What is the difference between terraform plan and terraform apply?
12
What is the Terraform Registry?
13
What is Terraform remote state?
14
What is count and for_each in Terraform?
15
What is terraform.tfvars file?
16
What are Terraform data sources?
17
What is the lifecycle block in Terraform?
18
What is Terraform Cloud?
19
What is the difference between Terraform and Ansible?
20
What are Terraform workspaces?
Intermediate
15 questions
Practical knowledge for developers with hands-on experience.
01
What is the Terraform state locking mechanism?
02
How do you handle sensitive values in Terraform?
03
What are Terraform Provisioners and when should you avoid them?
04
What is Terraform import?
05
How do you structure Terraform code for large teams?
06
What is Terragrunt?
07
What are Terraform modules best practices?
08
What is the terraform_remote_state data source?
09
How do you test Terraform code?
10
What is Terraform drift and how do you handle it?
11
What is the Terraform provider version constraint syntax?
12
What is the Terraform lifecycle of a resource?
13
What is Packer and how does it relate to Terraform?
14
What is Atlantis and how does it automate Terraform?
15
How do you manage multiple environments in Terraform?
Advanced
10 questions
Deep expertise questions for senior and lead roles.
01
What is Terraform's provider development and custom providers?
02
What is Policy as Code with Sentinel in Terraform?
03
How does Terraform handle dependencies between resources?
04
What is the Terraform CDK (CDKTF)?
05
What are advanced Terraform state management operations?
06
How do you implement a CI/CD pipeline for Terraform?
07
What is Terraform's approach to secret management with Vault?
08
What are common Terraform anti-patterns and pitfalls?
09
How does Terraform handle provider authentication in different environments?
10
What is OpenTofu and how does it relate to Terraform?
Back to All Topics
45 questions total