terraform workspace list supports JSON output
Introduced 2026-08-26 · score 0.98
HOW TO USE IT
When a script needs machine-readable workspace enumeration, run `terraform workspace list -json` to emit JSON output.
terraform workspace list -jsonWHY THIS HELPS
Enumerate workspaces in a script that needs machine-readable output.
REQUIREMENTS AND LIMITATIONS
- Version: 1.16.0
- -json: Produce machine-readable JSON output; always disables color.
FIRST-PARTY EVIDENCE
- https://github.com/hashicorp/terraform/releases/tag/v1.16.0
- https://developer.hashicorp.com/terraform/cli/commands/workspace/list
Check the installed version and the source before using it. Entry JSON