What is the default workspace name when you initialize a new Terraform configuration without creating any additional workspaces?
Think about the workspace Terraform uses if you never switch or create a new one.
Terraform uses a workspace named default automatically if no other workspace is selected or created.
When you switch from the default workspace to a new workspace named dev, what happens to the Terraform state files?
Think about how Terraform isolates environments using workspaces.
Each workspace has its own separate state file to isolate infrastructure states.
You want to manage production and staging environments using Terraform workspaces. Which approach correctly uses workspaces to separate these environments?
Workspaces are designed to isolate state for different environments.
Creating separate workspaces for production and staging allows isolated state management and easy switching.
What is a potential security risk of using the default workspace for multiple environments in Terraform?
Consider what happens if multiple environments share the same state file.
Using the default workspace for multiple environments risks overwriting state files, causing unintended resource changes.
In a team environment, what is the best practice to manage Terraform workspaces to avoid conflicts and ensure smooth collaboration?
Think about how teams can share state safely and avoid conflicts.
Using a remote backend with workspace support and naming conventions helps teams collaborate safely and avoid state conflicts.