Recall & Review
beginner
What is a Terraform workspace?
A Terraform workspace is like a separate workspace folder where Terraform keeps its state files. It lets you manage multiple environments (like dev, test, prod) using the same configuration but with isolated states.
Click to reveal answer
beginner
Why use remote state in Terraform?
Remote state stores Terraform's state file in a shared place like cloud storage. This helps teams work together safely, avoids state conflicts, and keeps the state backed up and secure.
Click to reveal answer
intermediate
How does Terraform prevent state conflicts when using remote state?
Terraform uses locking mechanisms on remote state backends to prevent multiple people from changing the state at the same time, avoiding conflicts and corruption.
Click to reveal answer
beginner
What is the difference between local and remote state?
Local state is saved on your computer, which is simple but risky for teams. Remote state is saved in a shared service like AWS S3 or Terraform Cloud, making it safer and better for collaboration.
Click to reveal answer
intermediate
How do Terraform workspaces help manage multiple environments?
Workspaces let you switch between different state files easily without changing your code. For example, you can have a 'dev' workspace and a 'prod' workspace, each with its own infrastructure state.Click to reveal answer
What does a Terraform workspace primarily isolate?
✗ Incorrect
Terraform workspaces isolate state files, allowing multiple states for the same configuration.
Which of these is a benefit of using remote state?
✗ Incorrect
Remote state allows teams to share and lock state files safely.
What happens if two users try to update the remote state at the same time?
✗ Incorrect
Terraform uses locking to prevent simultaneous state updates.
Where is local Terraform state stored by default?
✗ Incorrect
Local state is stored on the user's local machine by default.
How do you switch between Terraform workspaces?
✗ Incorrect
You switch workspaces with 'terraform workspace select '.
Explain how Terraform workspaces help manage multiple environments.
Think about how you keep your work organized in different folders.
You got /4 concepts.
Describe the benefits of using remote state in Terraform.
Imagine sharing a single notebook safely with your team.
You got /4 concepts.