OpenTofu commands support simultaneous UI and JSON output
Introduced 2026-05-14 · score 0.97
HOW TO USE IT
When a supported command needs both human-readable UI and machine-readable output, run it with `-json-into=<filename>` to save JSON while keeping the UI on standard output.
tofu plan -json-into=<JSON_FILE>WHY THIS HELPS
Use machine-readable output to supplement the normal OpenTofu UI while implementing or debugging a tool that interprets command output.
BEFORE THIS CHANGE
Previously, commands that supported both output formats could be run with only one or the other.
REQUIREMENTS AND LIMITATIONS
- Version: v1.12.0
- -json-into=<FILENAME> (required): Writes the same machine-readable output as `-json` to the given file, allowing simultaneous human-readable and machine-readable output.
- Prerequisite: Use a command that supports both human-oriented UI and machine-readable JSON output.
- Applies to commands that support both human-oriented UI output and machine-readable JSON output.
FIRST-PARTY EVIDENCE
- https://github.com/opentofu/opentofu/releases/tag/v1.12.0
- https://opentofu.org/blog/dual-command-output-streams/
- https://opentofu.org/docs/v1.12/intro/whats-new/
Check the installed version and the source before using it. Entry JSON