From dfbb9c2e10ede6f0a8bd4381d03b3360f0c2f32a Mon Sep 17 00:00:00 2001 From: Robert Hafner Date: Wed, 5 Apr 2023 17:36:22 -0500 Subject: [PATCH] website: templatefile variables are an object, not a map Although maps and objects are similar, maps require that all values be of the same type while objects can allow different values to have their own type. This function does not restrict itself to maps- the examples themselves include cases where both strings and lists are passed through, making this an object and not a map. --- website/docs/language/functions/templatefile.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/language/functions/templatefile.mdx b/website/docs/language/functions/templatefile.mdx index 5c81d93b19..ed919ee875 100644 --- a/website/docs/language/functions/templatefile.mdx +++ b/website/docs/language/functions/templatefile.mdx @@ -20,8 +20,8 @@ in the main Terraform language, including interpolation sequences delimited with `${` ... `}`. This function just allows longer template sequences to be factored out into a separate file for readability. -The "vars" argument must be a map. Within the template file, each of the keys -in the map is available as a variable for interpolation. The template may +The "vars" argument must be an object. Within the template file, each of the +keys in the map is available as a variable for interpolation. The template may also use any other function available in the Terraform language, except that recursive calls to `templatefile` are not permitted. Variable names must each start with a letter, followed by zero or more letters, digits, or