IaC · Terraform interview questions

69 IaC · Terraform questions from the DevOps & SRE bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is Provider?

Junior
  1. A.a last-resort block that runs scripts on a resource during create or destroy
  2. B.a block declaring a piece of infrastructure Terraform should manage
  3. C.the terraform.tfstate that maps configuration to real-world resources
  4. D.a plugin that lets Terraform manage a specific platform's resources via its API

Answer + AI explanation with Pro

2. Which term means: "a plugin that lets Terraform manage a specific platform's resources via its API"?

Junior
  1. A.Provider
  2. B.Resource
  3. C.Workspace
  4. D.for_each meta-argument

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.Provider — a divergence between Terraform's recorded state and the actual deployed infrastructure
  2. B.Provider — a read-only query of existing infrastructure or external information
  3. C.Provider — a block declaring a piece of infrastructure Terraform should manage
  4. D.Provider — a plugin that lets Terraform manage a specific platform's resources via its API

Answer + AI explanation with Pro

4. What is Resource?

Junior
  1. A.a value a configuration exports for display or for use by other configurations
  2. B.a mechanism preventing concurrent operations from corrupting shared state
  3. C.a block declaring a piece of infrastructure Terraform should manage
  4. D.a way to create multiple resource instances from a map or set of keys

Answer + AI explanation with Pro

5. Which term means: "a block declaring a piece of infrastructure Terraform should manage"?

Junior
  1. A.Drift
  2. B.Output
  3. C.Module
  4. D.Resource

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.Resource — a named, isolated state instance used to manage multiple environments from one config
  2. B.Resource — a block declaring a piece of infrastructure Terraform should manage
  3. C.Resource — a mechanism preventing concurrent operations from corrupting shared state
  4. D.Resource — a value a configuration exports for display or for use by other configurations

Answer + AI explanation with Pro

7. What is State file?

Junior
  1. A.storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  2. B.a last-resort block that runs scripts on a resource during create or destroy
  3. C.the terraform.tfstate that maps configuration to real-world resources
  4. D.a divergence between Terraform's recorded state and the actual deployed infrastructure

Answer + AI explanation with Pro

8. Which term means: "the terraform.tfstate that maps configuration to real-world resources"?

Junior
  1. A.State file
  2. B.for_each meta-argument
  3. C.Provider
  4. D.Drift

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.State file — a last-resort block that runs scripts on a resource during create or destroy
  2. B.State file — a way to create multiple resource instances from a map or set of keys
  3. C.State file — a mechanism preventing concurrent operations from corrupting shared state
  4. D.State file — the terraform.tfstate that maps configuration to real-world resources

Answer + AI explanation with Pro

10. What is Module?

Junior
  1. A.an input parameter that makes a Terraform configuration customizable
  2. B.a named, isolated state instance used to manage multiple environments from one config
  3. C.a reusable container of Terraform configuration grouping related resources
  4. D.a read-only query of existing infrastructure or external information

Answer + AI explanation with Pro

11. Which term means: "a reusable container of Terraform configuration grouping related resources"?

Junior
  1. A.Provisioner
  2. B.Resource
  3. C.Plan
  4. D.Module

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.Module — storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  2. B.Module — an input parameter that makes a Terraform configuration customizable
  3. C.Module — a preview showing the actions Terraform will take to reach the desired state
  4. D.Module — a reusable container of Terraform configuration grouping related resources

Answer + AI explanation with Pro

13. What is Variable?

Junior
  1. A.an input parameter that makes a Terraform configuration customizable
  2. B.a way to create multiple resource instances from a map or set of keys
  3. C.a reusable container of Terraform configuration grouping related resources
  4. D.a read-only query of existing infrastructure or external information

Answer + AI explanation with Pro

14. Which term means: "an input parameter that makes a Terraform configuration customizable"?

Junior
  1. A.Variable
  2. B.Module
  3. C.for_each meta-argument
  4. D.Workspace

Answer + AI explanation with Pro

15. Which statement is correct?

Junior
  1. A.Variable — storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  2. B.Variable — a preview showing the actions Terraform will take to reach the desired state
  3. C.Variable — a last-resort block that runs scripts on a resource during create or destroy
  4. D.Variable — an input parameter that makes a Terraform configuration customizable

Answer + AI explanation with Pro

16. What is Output?

Junior
  1. A.storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  2. B.a mechanism preventing concurrent operations from corrupting shared state
  3. C.an input parameter that makes a Terraform configuration customizable
  4. D.a value a configuration exports for display or for use by other configurations

Answer + AI explanation with Pro

17. Which term means: "a value a configuration exports for display or for use by other configurations"?

Junior
  1. A.Variable
  2. B.for_each meta-argument
  3. C.Provisioner
  4. D.Output

Answer + AI explanation with Pro

18. Which statement is correct?

Junior
  1. A.Output — an input parameter that makes a Terraform configuration customizable
  2. B.Output — a plugin that lets Terraform manage a specific platform's resources via its API
  3. C.Output — a value a configuration exports for display or for use by other configurations
  4. D.Output — a preview showing the actions Terraform will take to reach the desired state

Answer + AI explanation with Pro

19. What is Remote backend?

Mid
  1. A.a divergence between Terraform's recorded state and the actual deployed infrastructure
  2. B.the terraform.tfstate that maps configuration to real-world resources
  3. C.storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  4. D.a mechanism preventing concurrent operations from corrupting shared state

Answer + AI explanation with Pro

20. Which term means: "storage for state outside the local disk, often with locking, such as S3 plus DynamoDB"?

Mid
  1. A.Variable
  2. B.Drift
  3. C.Provisioner
  4. D.Remote backend

Answer + AI explanation with Pro

21. Which statement is correct?

Mid
  1. A.Remote backend — the terraform.tfstate that maps configuration to real-world resources
  2. B.Remote backend — storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  3. C.Remote backend — a last-resort block that runs scripts on a resource during create or destroy
  4. D.Remote backend — a preview showing the actions Terraform will take to reach the desired state

Answer + AI explanation with Pro

22. What is Plan?

Mid
  1. A.a read-only query of existing infrastructure or external information
  2. B.a block declaring a piece of infrastructure Terraform should manage
  3. C.a preview showing the actions Terraform will take to reach the desired state
  4. D.a divergence between Terraform's recorded state and the actual deployed infrastructure

Answer + AI explanation with Pro

23. Which term means: "a preview showing the actions Terraform will take to reach the desired state"?

Mid
  1. A.State file
  2. B.Plan
  3. C.Resource
  4. D.Provider

Answer + AI explanation with Pro

24. Which statement is correct?

Mid
  1. A.Plan — a mechanism preventing concurrent operations from corrupting shared state
  2. B.Plan — a preview showing the actions Terraform will take to reach the desired state
  3. C.Plan — an input parameter that makes a Terraform configuration customizable
  4. D.Plan — a divergence between Terraform's recorded state and the actual deployed infrastructure

Answer + AI explanation with Pro

25. What is Data source?

Mid
  1. A.a read-only query of existing infrastructure or external information
  2. B.an input parameter that makes a Terraform configuration customizable
  3. C.a mechanism preventing concurrent operations from corrupting shared state
  4. D.a plugin that lets Terraform manage a specific platform's resources via its API

Answer + AI explanation with Pro

26. Which term means: "a read-only query of existing infrastructure or external information"?

Mid
  1. A.for_each meta-argument
  2. B.Data source
  3. C.Variable
  4. D.Remote backend

Answer + AI explanation with Pro

27. Which statement is correct?

Mid
  1. A.Data source — a named, isolated state instance used to manage multiple environments from one config
  2. B.Data source — a read-only query of existing infrastructure or external information
  3. C.Data source — an input parameter that makes a Terraform configuration customizable
  4. D.Data source — a value a configuration exports for display or for use by other configurations

Answer + AI explanation with Pro

28. What is State lock?

Mid
  1. A.storage for state outside the local disk, often with locking, such as S3 plus DynamoDB
  2. B.a read-only query of existing infrastructure or external information
  3. C.a mechanism preventing concurrent operations from corrupting shared state
  4. D.a value a configuration exports for display or for use by other configurations

Answer + AI explanation with Pro

29. Which term means: "a mechanism preventing concurrent operations from corrupting shared state"?

Mid
  1. A.State lock
  2. B.Data source
  3. C.Provisioner
  4. D.Resource

Answer + AI explanation with Pro

30. Which statement is correct?

Mid
  1. A.State lock — the terraform.tfstate that maps configuration to real-world resources
  2. B.State lock — a way to create multiple resource instances from a map or set of keys
  3. C.State lock — a mechanism preventing concurrent operations from corrupting shared state
  4. D.State lock — storage for state outside the local disk, often with locking, such as S3 plus DynamoDB

Answer + AI explanation with Pro

Showing 30 of 69 IaC · Terraform questions — the full set, with answers, explanations and an AI tutor on every question, is inside.

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every IaC · Terraform question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers