Skip to content

Commit

Permalink
docs: Fix condition example
Browse files Browse the repository at this point in the history
  • Loading branch information
tochev committed Aug 21, 2022
1 parent 023ab32 commit 4e506d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/language/expressions/custom-conditions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```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.
Expand Down

0 comments on commit 4e506d5

Please sign in to comment.