Skip to content

Commit f9fc47c

Browse files
committed
website: Add documentation for machine readable UI
Terraform 0.15.3 added support for a `-json` flag to the plan, apply, and refresh commands, which renders the Terraform UI output in a structured machine readable format. This commit adds documentation for this interface.
1 parent 1c3f4fe commit f9fc47c

3 files changed

Lines changed: 563 additions & 0 deletions

File tree

‎website/docs/cli/commands/apply.html.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ _in addition to_ the planning modes and planning options described for
9191
[Running Terraform in Automation](https://learn.hashicorp.com/tutorials/terraform/automate-terraform?in=terraform/automation&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) for some
9292
different approaches.
9393

94+
* `-json` - Enables the [machine readable JSON UI][machine-readable-ui] output.
95+
This implies `-input=false`, so the configuration must have no unassigned
96+
variable values to continue. To enable this flag, you must also either enable
97+
the `-auto-approve` flag or specify a previously-saved plan.
98+
99+
[machine-readable-ui]: /docs/internals/machine-readable-ui.html
100+
94101
* `-lock=false` - Don't hold a state lock during the operation. This is
95102
dangerous if others might concurrently run commands against the same
96103
workspace.

‎website/docs/cli/commands/plan.html.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ The available options are:
255255
a value. This option is particularly useful when running Terraform in
256256
non-interactive automation systems.
257257

258+
* `-json` - Enables the [machine readable JSON UI][machine-readable-ui] output.
259+
This implies `-input=false`, so the configuration must have no unassigned
260+
variable values to continue.
261+
262+
[machine-readable-ui]: /docs/internals/machine-readable-ui.html
263+
258264
* `-lock=false` - Don't hold a state lock during the operation. This is
259265
dangerous if others might concurrently run commands against the same
260266
workspace.

0 commit comments

Comments
 (0)