From 40dfd20dda61986265925656448746c30160ffb5 Mon Sep 17 00:00:00 2001 From: Craig Wright Date: Fri, 28 Jul 2023 15:11:06 -0700 Subject: [PATCH] Update tostring.mdx for null value conversion Per https://github.com/hashicorp/terraform/issues/33603, updating the documentation to accurately reflect the current implementation. --- website/docs/language/functions/tostring.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/language/functions/tostring.mdx b/website/docs/language/functions/tostring.mdx index 0b3db29b8c..7eacec9348 100644 --- a/website/docs/language/functions/tostring.mdx +++ b/website/docs/language/functions/tostring.mdx @@ -12,7 +12,7 @@ convert types automatically where required. Use the explicit type conversion functions only to normalize types returned in module outputs. Only the primitive types (string, number, and bool) and `null` can be converted to string. -All other values will produce an error. +`tostring(null)` produces a `null` value of type `string`. All other values will produce an error. ## Examples @@ -24,7 +24,7 @@ hello > tostring(true) true > tostring(null) -null +tostring(null) > tostring([]) Error: Invalid function argument