Add null to tonumber docs
This commit is contained in:
parent
eb927958bd
commit
b3fe8713e8
|
@ -14,7 +14,7 @@ Explicit type conversions are rarely necessary in Terraform because it will
|
||||||
convert types automatically where required. Use the explicit type conversion
|
convert types automatically where required. Use the explicit type conversion
|
||||||
functions only to normalize types returned in module outputs.
|
functions only to normalize types returned in module outputs.
|
||||||
|
|
||||||
Only numbers and strings containing decimal representations of numbers can be
|
Only numbers, `null`, and strings containing decimal representations of numbers can be
|
||||||
converted to number. All other values will produce an error.
|
converted to number. All other values will produce an error.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
@ -24,6 +24,8 @@ converted to number. All other values will produce an error.
|
||||||
1
|
1
|
||||||
> tonumber("1")
|
> tonumber("1")
|
||||||
1
|
1
|
||||||
|
> tonumber(null)
|
||||||
|
null
|
||||||
> tonumber("no")
|
> tonumber("no")
|
||||||
Error: Invalid function argument
|
Error: Invalid function argument
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue