Challenge - 5 Problems
Terraform Workspace Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate2:00remaining
What happens after creating a new workspace?
You run the command
terraform workspace new dev in your project directory. What is the immediate effect on your Terraform environment?Attempts:
2 left
💡 Hint
Think about what Terraform does immediately after creating a workspace.
✗ Incorrect
When you create a new workspace with 'terraform workspace new ', Terraform creates it and switches to it automatically.
❓ Configuration
intermediate2:00remaining
Which command switches to an existing workspace?
You have workspaces named 'default', 'staging', and 'production'. Which command switches your current workspace to 'staging'?
Attempts:
2 left
💡 Hint
Look for the official command to switch workspaces.
✗ Incorrect
The correct command to switch to an existing workspace is 'terraform workspace select '.
❓ Architecture
advanced2:00remaining
How do workspaces affect your Terraform state files?
You have multiple workspaces in your Terraform project. How does Terraform manage state files for these workspaces?
Attempts:
2 left
💡 Hint
Think about isolation of environments in Terraform.
✗ Incorrect
Terraform stores a separate state file for each workspace to isolate their resources.
❓ security
advanced2:00remaining
What is a security risk when sharing Terraform workspaces?
If multiple team members share the same Terraform workspace, what is a potential security risk?
Attempts:
2 left
💡 Hint
Consider what happens if multiple people change infrastructure at once.
✗ Incorrect
Sharing a workspace can cause state conflicts if multiple users apply changes simultaneously, risking data loss.
✅ Best Practice
expert2:00remaining
What is the best practice for managing environments with Terraform workspaces?
You want to manage multiple environments (dev, staging, prod) using Terraform workspaces. Which approach is best?
Attempts:
2 left
💡 Hint
Think about isolation and maintainability of environments.
✗ Incorrect
Using separate workspaces per environment with environment-specific variables managed separately is best practice for isolation and clarity.