You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-8
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,6 @@
2
2
3
3
The Terraform Workspace Selector is a command-line tool that helps you interactively select a Terraform workspace from the available options.
4
4
5
-
I generated this entirely using ChatGPT and don't know what I'm doing, so there might be problems or inefficiencies. Feel free to open issues.
6
-
7
-
8
5
## Functionality
9
6
10
7
The application provides the following basic functionality:
@@ -13,14 +10,18 @@ The application provides the following basic functionality:
13
10
- Displays an interactive prompt that allows you to select a workspace.
14
11
- Sets the selected workspace using the `terraform workspace select` command.
15
12
13
+
## Install
16
14
17
-
## Usage
15
+
To install Terraform Workspace Selector, you can do either of the following:
16
+
- Run `go install github.com/abyss/tfws@latest`
18
17
19
-
To use the Terraform Workspace Selector, follow these steps:
18
+
- Download a binary from GitHub and put it in your PATH
19
+
20
+
`tfws` calls `terraform` directly, so terraform will need to be resolvable from your path. Tools like [tenv](https://github.com/tofuutils/tenv) or [asdf](https://github.com/asdf-vm/asdf) should natively work.
21
+
22
+
## Usage
20
23
21
-
1. Run `task build` to create a binary (located in `bin/`)
22
-
2. Copy that binary somewhere in your path.
23
-
3. Run `tfws` in your Terraform project.
24
+
To use the Terraform Workspace Selector, just run `tfws` in a Terraform project with multiple workspaces.
24
25
25
26
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.
0 commit comments