2025-04-03 20:36:56 -06:00
|
|
|
# tofu output
|
|
|
|
|
|
|
|
|
|
> Export structured data about your OpenTofu resources.
|
|
|
|
|
> More information: <https://opentofu.org/docs/cli/commands/output/>.
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Display all outputs for the root module:
|
2025-04-03 20:36:56 -06:00
|
|
|
|
|
|
|
|
`tofu output`
|
|
|
|
|
|
|
|
|
|
- Output only a value with specific name:
|
|
|
|
|
|
|
|
|
|
`tofu output {{name}}`
|
|
|
|
|
|
|
|
|
|
- Convert the output value to a raw string (useful for shell scripts):
|
|
|
|
|
|
|
|
|
|
`tofu output -raw`
|
|
|
|
|
|
|
|
|
|
- Format the outputs as a JSON object, with a key per output (useful with `jq`):
|
|
|
|
|
|
|
|
|
|
`tofu output -json`
|