Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli-Meitner authored Nov 8, 2022
1 parent 4e9a930 commit 6c38e61
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@ the arguments should include the -a|--action flag which calls the function (acti

```hcl
#The following example validates there are no duplicate environments under two different data layers:
module "validate" {
source = "toluna-terraform/validations/custom"
version = "~>0.0.1" // Change to the required version.
arguments = "-a validate_duplicate_env -f ${path.module}/some_json_file.json"
}
#The following example validates you cannot enter a negative value as an index number or an index higher then maximum possible ciders in a json file:
module "validate" {
source = "toluna-terraform/validations/custom"
version = "~>0.0.1" // Change to the required version.
arguments = "-a validate_min_max_env -f ${path.module}/some_json_file.json -m 15"
}
#The following example validates you cannot enter a duplicate index number in a json file:
module "validate" {
source = "toluna-terraform/validations/custom"
version = "~>0.0.1" // Change to the required version.
arguments = "-a validate_duplicate_index -f ${path.module}/some_json_file.json"
required_providers {
toluna = {
source = "toluna-terraform/toluna"
}
}
}
data "toluna_validate_configuration" "app_json" {
dynamic "rule_set" {
for_each = local.app_config
content {
key_name = rule_set.value["key_name"]
rule = rule_set.value["rule"]
value = rule_set.value["value"]
}
}
json_config = data.consul_keys.appjson.var
}
```

## Toggles
Expand Down

0 comments on commit 6c38e61

Please sign in to comment.