Skip to content

Commit

Permalink
Update resource name and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrosousa committed Dec 11, 2024
1 parent 2a9fd6e commit 76de0be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Refer to the [`lookup_json_string()`](/ruleset-engine/rules-language/functions/#

</TabItem> <TabItem label="Terraform">

Use the `cloudflare_leaked_credential_check_rules` resource to add custom detection locations. For example:
Use the `cloudflare_leaked_credential_check_rule` resource to add a custom detection location. For example:

<Render file="leaked-credentials-detection-add-custom-location-terraform" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@

```terraform
# Create user-defined detection locations for leaked credentials detection
resource "cloudflare_leaked_credential_check_rules" "custom_location_example" {
resource "cloudflare_leaked_credential_check_rule" "custom_location_example" {
zone_id = "<ZONE_ID>"
rule {
username = "lookup_json_string(http.request.body.raw, \"user\")"
password = "lookup_json_string(http.request.body.raw, \"secret\")"
}
username = "lookup_json_string(http.request.body.raw, \"user\")"
password = "lookup_json_string(http.request.body.raw, \"secret\")"
}
```

To create another custom detection location, add a new `rule` object to the same `cloudflare_leaked_credential_check_rules` resource.

For more information, refer to the [Terraform Cloudflare provider](https://registry.terraform.io/providers/cloudflare/cloudflare/4.48.0/docs/resources/leaked_credential_check_rules) documentation.
For more information, refer to the [Terraform Cloudflare provider documentation](https://registry.terraform.io/providers/cloudflare/cloudflare/4.48.0/docs/resources/leaked_credential_check_rule).

0 comments on commit 76de0be

Please sign in to comment.