mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Update tostring.mdx for null value conversion
Per https://github.com/hashicorp/terraform/issues/33603, updating the documentation to accurately reflect the current implementation.
This commit is contained in:
parent
76b504f6d7
commit
40dfd20dda
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user