Question 9 of 10Pro Only

Explain the difference between declarative and imperative approaches in Infrastructure as Code. Which approach does Terraform use, and why?

Sample answer preview

Declarative and imperative are two fundamentally different approaches to defining infrastructure. Understanding the distinction is crucial for choosing the right tools and writing effective infrastructure code.

declarativeimperativeidempotencydesired statestate filedependency management

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more DevOps Engineer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime