From 3eea9d709df6a474b4fbd373b41ced570319365c Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Fri, 29 Apr 2022 16:59:39 -0400 Subject: [PATCH] Add warning about spaces in variable value assignment --- website/docs/cli/commands/plan.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/cli/commands/plan.mdx b/website/docs/cli/commands/plan.mdx index a4df0df2fa..606d791058 100644 --- a/website/docs/cli/commands/plan.mdx +++ b/website/docs/cli/commands/plan.mdx @@ -167,6 +167,8 @@ we recommend using the `-var-file` option instead, and write your actual values in a separate file so that Terraform can parse them directly, rather than interpreting the result of your shell's parsing. +~> **Warning:** Terraform will error if you include a space before or after the equals sign (e.g., `-var "length = 2"`). + To use `-var` on a Unix-style shell on a system like Linux or macOS we recommend writing the option argument in single quotes `'` to ensure the shell will interpret the value literally: