Skip to content

Commit

Permalink
docs: describe custom rule value in depth
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-cloudconformity committed Jan 17, 2024
1 parent 8a11cd9 commit fb1d60d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/resources/conformity_custom_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ A `condition` block supports the following
* `path` (Optional) Secondary JSONPath query to apply to further evaluate nested data.
* `value` (Required) The expected value from the JSONPath query. This can be a string, number, boolean, or object.

~> **NOTE:** If the `value` is either a number, boolean, or object. It **must** be encoded using the built-in `jsonencode` function. e.g. `value = jsonencode(true)`, `value=jsonencode({"days"=20,"operator"="within"})`
~> **NOTE:** If the `value` is either a number, boolean, or object. It **must** be encoded using the built-in `jsonencode` function. e.g.
* Number: `value = jsonencode(86400)`
* Boolean: `value = jsonencode(true)`
* Object: `value=jsonencode({"days"=20,"operator"="within"})`

A `value` block can be defined but must follow the structure below and encoded
A `value` block can be defined using the built-in Terraform `jsonencode()` function but must follow the structure below
* `days` (Required) The number of days to compare against.
* `operator` (Required) Date comparison operator, e.g. "within", "olderThan"

0 comments on commit fb1d60d

Please sign in to comment.