github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/website/docs/cli/commands/workspace/select.mdx (about)

     1  ---
     2  page_title: 'Command: workspace select'
     3  description: The terraform workspace select command is used to choose a workspace.
     4  ---
     5  
     6  # Command: workspace select
     7  
     8  The `terraform workspace select` command is used to choose a different
     9  workspace to use for further operations.
    10  
    11  ## Usage
    12  
    13  Usage: `terraform workspace select NAME [DIR]`
    14  
    15  This command will select another workspace. The named workspace must already
    16  exist.
    17  
    18  The supported flags are:
    19  
    20  * `-or-create` - If the workspace that is being selected does not exist, create it. Default is `false`.
    21  
    22  ## Example
    23  
    24  ```
    25  $ terraform workspace list
    26    default
    27  * development
    28    jsmith-test
    29  
    30  $ terraform workspace select default
    31  Switched to workspace "default".
    32  ```