terraform Verified current stable Not installed? Cloud Infrastructure

Terraform / Format Outputs As Json Object

Format Outputs As Json Object

Terraform command syntax to format outputs as json object. Copyable examples, output expectations, and common mistakes.

$
Terminal
terraform output -json

Command Breakdown

What each part is doing

terraform
Base Command
The executable that performs this operation. Here it runs Terraform before the shell applies any redirect operators.
-json
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.