Linux command
tofu-output 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show all outputs
tofu output
Show specific output
tofu output [name]
Output as JSON
tofu output -json
Get raw value
tofu output -raw [name]
说明
tofu output displays output values from OpenTofu state. OpenTofu is the open-source fork of Terraform. Shows values defined in output blocks. When called without a name argument, it displays all outputs. The default human-readable format may change between versions; use -json for stable machine-readable output in scripts. When using -json or -raw, sensitive values are displayed in plain text.
参数
- -json
- Output as JSON. Sensitive values are displayed in plain text.
- -raw
- Output raw string value. Only works with values that can be automatically converted to strings.
- -state _path_
- Read from a specific state file instead of the default.
- -no-color
- Disable color output.
FAQ
What is the tofu-output command used for?
tofu output displays output values from OpenTofu state. OpenTofu is the open-source fork of Terraform. Shows values defined in output blocks. When called without a name argument, it displays all outputs. The default human-readable format may change between versions; use -json for stable machine-readable output in scripts. When using -json or -raw, sensitive values are displayed in plain text.
How do I run a basic tofu-output example?
Run `tofu output` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -json do in tofu-output?
Output as JSON. Sensitive values are displayed in plain text.