Recall & Review
beginner
What is the default workspace in Terraform?
The default workspace is the initial workspace Terraform creates automatically. It holds the state for your infrastructure unless you create and switch to other workspaces.
Click to reveal answer
beginner
How does the default workspace relate to Terraform state files?
The default workspace stores its state in the main state file (usually
terraform.tfstate). Other workspaces have separate state files.Click to reveal answer
intermediate
Can you rename or delete the default workspace in Terraform?
No, the default workspace cannot be renamed or deleted. It always exists as the base workspace.
Click to reveal answer
beginner
How do you switch from the default workspace to another workspace?
Use the command
terraform workspace select <workspace-name> to switch from the default workspace to another existing workspace.Click to reveal answer
intermediate
Why use multiple workspaces instead of just the default workspace?
Multiple workspaces let you manage different environments (like dev, test, prod) with separate states, avoiding conflicts and making management easier.Click to reveal answer
What is the name of the initial workspace Terraform creates by default?
✗ Incorrect
Terraform always creates a workspace named 'default' when you initialize a new configuration.
Can you delete the default workspace in Terraform?
✗ Incorrect
The default workspace cannot be deleted; it is always present.
Which command switches to a different workspace?
✗ Incorrect
Use 'terraform workspace select ' to switch workspaces.
Where does the default workspace store its state?
✗ Incorrect
The default workspace stores state in the main terraform.tfstate file.
Why might you create multiple workspaces instead of using only the default?
✗ Incorrect
Multiple workspaces help manage different environments like dev, test, and prod separately.
Explain what the default workspace is and its role in Terraform state management.
Think about how Terraform keeps track of your infrastructure by default.
You got /4 concepts.
Describe how and why you would use multiple workspaces instead of just the default workspace.
Consider managing dev, test, and prod environments.
You got /4 concepts.