mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-05 18:44:32 +00:00
26 lines
599 B
Plaintext
26 lines
599 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# tofu output
|
|
|
|
> Export structured data about your OpenTofu resources.
|
|
> More information: <https://opentofu.org/docs/cli/commands/output/>.
|
|
|
|
- With no additional arguments, `output` will display all outputs for the root module:
|
|
|
|
`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`
|