>DevOps Interview KB

Infrastructure as Code Interview Questions

9 questions

Cross-tool infrastructure-as-code questions on state management, drift, and module design that apply whether you're using Terraform, Pulumi, or something else entirely.

Related technologies:Infrastructure as CodeTerraform

How would you design scheduled Terraform drift detection so it alerts the right team without becoming noise nobody reads?

AdvancedTerraform8 min

Someone manually changed a cloud resource in the console that's managed by your IaC. What actually happens the next time the pipeline runs, and how would you handle the drift?

IntermediateTerraform8 min

How does the severity of infrastructure drift change for a stateful resource like a database, versus a stateless one like a security group rule?

IntermediateTerraform6 min

What's the risk of using terraform apply -target to fix drift on just one resource, and when is it actually the right call?

IntermediateTerraform6 min

What does idempotency actually mean for infrastructure-as-code tooling, and what breaks when a module isn't genuinely idempotent?

IntermediateTerraform6 min

What does 'immutable infrastructure' actually mean in practice, and what's the real trade-off against just patching servers in place?

IntermediateInfrastructure as Code6 min

Your team writes automated tests for application code as a matter of course, but your Terraform modules have none. How would you introduce testing for infrastructure code?

IntermediateTerraform7 min

How would you actually decide between Terraform, Pulumi, and a cloud-native tool like CloudFormation for a new project, beyond just 'what the team already knows'?

IntermediateTerraform7 min

You need to make a breaking change to a shared infrastructure module used by 30 different projects. How do you version and roll this out without breaking everyone simultaneously?

AdvancedTerraform8 min