Skip to content
/ tfws Public

Terraform Workspace Selector

License

Notifications You must be signed in to change notification settings

abyss/tfws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tfws - Terraform Workspace Selector

The Terraform Workspace Selector is a command-line tool that helps you interactively select a Terraform workspace from the available options.

Functionality

The application provides the following basic functionality:

  • Retrieves the list of Terraform workspaces using the terraform workspace list command.
  • Displays an interactive prompt that allows you to select a workspace.
  • Sets the selected workspace using the terraform workspace select command.

Requirements

tfws calls terraform directly, so terraform will need to be resolvable from your PATH. Tools like tenv or asdf should natively work.

Install

The Terraform Workspace Selector can be installed on macOS, Linux, or Windows, and should work with most standard shells, including PowerShell.

To install Terraform Workspace Selector, you can do either of the following:

  • Install using Homebrew: brew install abyss/tools/tfws
  • Download a binary from the GitHub releases page and put it in your PATH.

Usage

To use the Terraform Workspace Selector, just run tfws in a Terraform project with multiple workspaces.

Upon running the application, it will retrieve the list of Terraform workspaces and display an interactive prompt. Use the arrow keys or fuzzy search to navigate the options and press Enter to select a workspace. The selected workspace will be set using the terraform workspace select command.

Contributing

Contributions in the form of issues and pull requests are welcome. 😄

License

This project is licensed under the ISC License.

Copyright (c) 2024 Abyss