diff --git a/website/docs/cli/commands/console.mdx b/website/docs/cli/commands/console.mdx index ef7dd87f01..4dd610c298 100644 --- a/website/docs/cli/commands/console.mdx +++ b/website/docs/cli/commands/console.mdx @@ -9,6 +9,11 @@ description: >- The `tofu console` command provides an interactive console for evaluating [expressions](../../language/expressions/index.mdx). +:::warning +The `tofu console` command is not designed for use in scripts. You can use it, but +you may find that some functions don't work as intended. +::: + ## Usage Usage: `tofu console [options]` @@ -54,23 +59,6 @@ There are several other ways to set values for input variables in the root module, aside from the `-var` and `-var-file` options. Refer to [Assigning Values to Root Module Variables](../../language/values/variables.mdx#assigning-values-to-root-module-variables) for more information. -## Scripting - -The `tofu console` command can be used in non-interactive scripts -by piping newline-separated commands to it. Only the output from the -final command is printed unless an error occurs earlier. - -For example: - -```shell -$ echo 'split(",", "foo,bar,baz")' | tofu console -tolist([ - "foo", - "bar", - "baz", -]) -``` - ## Remote State If [remote state](../../language/state/remote.mdx) is used by the current backend,