Recall & Review
beginner
What is a Terraform workspace?
A Terraform workspace is a way to have multiple instances of the same infrastructure configuration, each with its own state. It helps manage different environments like development, testing, and production using the same code.
Click to reveal answer
beginner
When should you use Terraform workspaces?
Use workspaces when you want to manage multiple similar environments with the same configuration but separate states, such as dev, staging, and prod, without duplicating code.
Click to reveal answer
intermediate
Why not use workspaces for completely different projects?
Workspaces are not ideal for completely different projects because they share the same configuration files. Different projects should have separate Terraform configurations to avoid confusion and errors.
Click to reveal answer
beginner
How do workspaces help avoid state file conflicts?
Each workspace has its own state file, so changes in one workspace do not affect others. This separation prevents conflicts when managing multiple environments.
Click to reveal answer
beginner
What is a common real-life analogy for Terraform workspaces?
Think of workspaces like different folders for your school projects. Each folder has similar files but for different subjects. Workspaces keep your environments organized like these folders.
Click to reveal answer
What does a Terraform workspace primarily manage?
✗ Incorrect
Workspaces allow managing separate state files for different environments using the same configuration.
When is it NOT appropriate to use Terraform workspaces?
✗ Incorrect
Workspaces are not suitable for completely different projects; separate configurations are better.
How do workspaces help with environment management?
✗ Incorrect
Workspaces create separate state files for each environment, keeping them isolated.
Which command switches between Terraform workspaces?
✗ Incorrect
The 'terraform workspace select' command switches the active workspace.
What is a benefit of using workspaces instead of duplicating code for each environment?
✗ Incorrect
Workspaces reduce code duplication by using one configuration for multiple environments.
Explain when and why you would use Terraform workspaces in managing infrastructure.
Think about managing dev, test, and prod with one codebase.
You got /4 concepts.
Describe the limitations or situations where Terraform workspaces are not the best choice.
Consider when projects are very different.
You got /4 concepts.