terraform output

The command that prints output values from state; -raw prints one bare value for a shell variable and -json prints machine-readable output for programs.

In more detail

Sensitive outputs are hidden in the plain listing, but -raw and -json print them, deliberately, because their purpose is to hand the value to something else. Parse -json in pipelines rather than the human-readable format.

Examples

path=$(terraform output -raw manifest_path)
terraform output -json

Related terms

Taught in

References

Certification courses