Question 7 of 10Pro Only

How do you manage multiple environments like development, staging, and production with Terraform? Compare workspaces with directory-based approaches.

Sample answer preview

Managing multiple environments is a common challenge in Infrastructure as Code. Terraform offers several approaches, each with trade-offs. The two main strategies are workspaces and directory-based separation.

workspaceterraform workspaceenvironmentdirectory structurestate isolationshared modules

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