Which of the following is the main reason to use workspace naming conventions in Terraform?
Think about how naming helps manage multiple environments like dev, test, and prod.
Workspace naming conventions help clearly separate environments and prevent resource conflicts by giving each workspace a unique, descriptive name.
You manage infrastructure in two regions (us-east-1 and eu-west-1) and three environments (dev, staging, prod). Which workspace naming convention below best supports clear identification?
Consider which order helps you quickly identify region and environment.
Using region-env (like us-east-1-dev) helps group workspaces by region first, which is useful for managing region-specific resources.
Given the following Terraform CLI commands, which command correctly switches to the production workspace in the us-west-2 region if the naming convention is region-env?
terraform workspace list * default us-west-2-dev us-west-2-prod us-east-1-prod
Match the exact workspace name from the list.
The workspace name is us-west-2-prod following the region-env convention, so selecting it requires the exact name.
What is a potential security risk if Terraform workspaces are named inconsistently or unclearly?
Think about how confusion in naming can cause mistakes.
Unclear workspace names can lead to deploying sensitive resources like databases or secrets into the wrong environment, causing security risks.
In Terraform Cloud, how does the workspace name affect the storage and isolation of state files?
Consider how Terraform Cloud manages state isolation.
Terraform Cloud creates a separate state file for each workspace name, ensuring resource isolation and preventing conflicts.