mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #31672 from tochev/docs-fix-typo
docs: Fix condition example
This commit is contained in:
commit
036db86c1f
@ -242,7 +242,7 @@ Use the [`can` function](/language/functions/can) to concisely use the validity
|
|||||||
For example, you can use `can` with `regex` to test if a string matches a particular pattern because `regex` returns an error when given a non-matching string.
|
For example, you can use `can` with `regex` to test if a string matches a particular pattern because `regex` returns an error when given a non-matching string.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
condition = can(regex("^[a-z]+$", var.name)
|
condition = can(regex("^[a-z]+$", var.name))
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use `can` with the type conversion functions to test whether a value is convertible to a type or type constraint.
|
You can also use `can` with the type conversion functions to test whether a value is convertible to a type or type constraint.
|
||||||
|
Loading…
Reference in New Issue
Block a user