LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

terraform-output

Display Terraform output values

TLDR

Show all outputs
$ terraform output
copy
Show specific output
$ terraform output [name]
copy
Output as JSON
$ terraform output -json
copy
Get raw value
$ terraform output -raw [name]
copy

SYNOPSIS

terraform output [options] [name]

DESCRIPTION

terraform output reads output values from the Terraform state file. It displays values defined in `output` blocks of the root module. Useful for scripting, passing values between configurations, and extracting infrastructure details like IP addresses, URLs, or resource IDs.Use -raw to get a bare string suitable for shell scripting (no quotes or formatting). Use -json to get machine-readable output including type information. When called without a name, all outputs are displayed.

PARAMETERS

-json

Output as JSON.
-raw
Output raw string value.
-state path
Read from state file.
-no-color
Disable color output.

SEE ALSO

Copied to clipboard
Kai