From a8f08faab5fdcb07ad45e0dada24f81d620db1cf Mon Sep 17 00:00:00 2001 From: Clint Date: Tue, 19 Dec 2017 10:29:55 -0600 Subject: [PATCH] copy doc note from terraform-providers/terraform-provider-aws/2162 (#16940) --- website/docs/configuration/interpolation.html.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/docs/configuration/interpolation.html.md b/website/docs/configuration/interpolation.html.md index 14bc38efb3..cdeb42d673 100644 --- a/website/docs/configuration/interpolation.html.md +++ b/website/docs/configuration/interpolation.html.md @@ -141,6 +141,13 @@ Terraform ships with built-in functions. Functions are called with the syntax `name(arg, arg2, ...)`. For example, to read a file: `${file("path.txt")}`. +~> **NOTE**: Proper escaping is required for JSON field values containing quotes +(`"`) such as `environment` values. If directly setting the JSON, they should be +escaped as `\"` in the JSON, e.g. `"value": "I \"love\" escaped quotes"`. If +using a Terraform variable value, they should be escaped as `\\\"` in the +variable, e.g. `value = "I \\\"love\\\" escaped quotes"` in the variable and +`"value": "${var.myvariable}"` in the JSON. + ### Supported built-in functions The supported built-in functions are: