terraform/website/docs/commands
Martin Atkins 3268a7eaba command/output: Raw output mode
So far the output command has had a default output format intended for
human consumption and a JSON output format intended for machine
consumption.

However, until Terraform v0.14 the default output format for primitive
types happened to be _almost_ a raw string representation of the value,
and so users started using that as a more convenient way to access
primitive-typed output values from shell scripts, avoiding the need to
also use a tool like "jq" to decode the JSON.

Recognizing that primitive-typed output values are common and that
processing them with shell scripts is common, this commit introduces a new
-raw mode which is explicitly intended for that use-case, guaranteeing
that the result will always be the direct result of a string conversion
of the output value, or an error if no such conversion is possible.

Our policy elsewhere in Terraform is that we always use JSON for
machine-readable output. We adopted that policy because our other
machine-readable output has typically been complex data structures rather
than single primitive values. A special mode seems justified for output
values because it is common for root module output values to be just
strings, and so it's pragmatic to offer access to the raw value directly
rather than requiring a round-trip through JSON.
2020-12-09 10:10:02 -08:00
..
providers website: Correct formatting for lists in dependency lock docs 2020-12-03 09:16:58 -08:00
state backend: Validate remote backend Terraform version 2020-11-19 13:19:40 -05:00
workspace Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs 2020-11-11 19:31:05 -08:00
0.12upgrade.html.markdown website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
0.13upgrade.html.markdown website: Restore the docs for "terraform 0.12upgrade" 2020-06-24 14:21:09 -07:00
apply.html.markdown website: Update all Learn crosslinks (#26442) 2020-10-02 11:02:59 -07:00
cli-config.html.markdown website: Fix typo in docs/commands/cli-config (#27038) 2020-12-03 14:30:24 -04:00
console.html.markdown website: Update all links to {expressions,modules,resources}.html 2020-11-17 16:30:51 -08:00
destroy.html.markdown main: new global option -chdir 2020-09-04 15:31:08 -07:00
env.html.markdown website: Reorganize nav sidebars to improve jumps between sections 2019-01-31 16:18:23 -08:00
environment-variables.html.md logging env variable docs 2020-10-23 12:46:32 -04:00
fmt.html.markdown website: More words about "terraform fmt" 2020-11-25 08:03:37 -08:00
force-unlock.html.markdown ADD CLI option position for force-unlock command (#26626) 2020-10-21 18:13:18 -03:00
get.html.markdown Modified terraform get command (#26465) 2020-10-21 18:14:54 -03:00
graph.html.markdown main: new global option -chdir 2020-09-04 15:31:08 -07:00
import.html.md backend: Validate remote backend Terraform version 2020-11-19 13:19:40 -05:00
index.html.markdown website: Add new "glue"/overview pages for CLI and language docs 2020-11-11 19:13:23 -08:00
init.html.markdown Update docs and add warning for -get-plugins 2020-12-07 14:13:52 -05:00
login.html.markdown website: Documentation for the "terraform login" command (#22727) 2020-02-04 11:30:40 -05:00
logout.html.markdown command/logout: Add terraform logout command 2020-02-06 15:00:55 -05:00
output.html.markdown command/output: Raw output mode 2020-12-09 10:10:02 -08:00
plan.html.markdown Merge pull request #21936 from tiny-dancer/patch-1 2020-10-13 16:18:39 -04:00
providers.html.markdown website: Adopt islanded subcommands into unified "docs" (CLI) layout 2020-10-26 18:19:46 -07:00
push.html.markdown website: Delete terraform push docs; replace with note about the remote backend 2019-08-16 15:55:29 -07:00
refresh.html.markdown main: new global option -chdir 2020-09-04 15:31:08 -07:00
show.html.markdown main: new global option -chdir 2020-09-04 15:31:08 -07:00
taint.html.markdown backend: Validate remote backend Terraform version 2020-11-19 13:19:40 -05:00
untaint.html.markdown backend: Validate remote backend Terraform version 2020-11-19 13:19:40 -05:00
validate.html.markdown main: new global option -chdir 2020-09-04 15:31:08 -07:00