Update documentation regarding short-circuiting boolean operators (#3063)

Signed-off-by: Clément Denis <clement.denis@gmail.com>
This commit is contained in:
Clément Denis
2025-07-24 12:04:52 +02:00
committed by GitHub
parent e718044193
commit 7dd55ebd5a

View File

@@ -103,4 +103,4 @@ OpenTofu does not have an operator for the "exclusive OR" operation. If you
know that both operators are boolean values then exclusive OR is equivalent know that both operators are boolean values then exclusive OR is equivalent
to the `!=` ("not equal") operator. to the `!=` ("not equal") operator.
The logical operators in OpenTofu do not short-circuit, meaning `var.foo || var.foo.bar` will produce an error message if `var.foo` is `null` because both `var.foo` and `var.foo.bar` are evaluated. The logical operators in OpenTofu are short-circuiting, meaning `var.foo == null || var.foo.bar == 1` will not produce an error message if `var.foo` is `null` because `var.foo.bar` is not evaluated.