Skip to content

Commit d8b93e7

Browse files
committed
Add Terraform tabs in malicious uploads' get started page
1 parent 8beedfd commit d8b93e7

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/content/docs/waf/detections/malicious-uploads/get-started.mdx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ head:
1111
import { Details, TabItem, Tabs } from "~/components";
1212

1313
:::note
14-
1514
WAF content scanning is available to customers on an Enterprise plan with a paid add-on.
1615
:::
1716

18-
## 1. Enable WAF content scanning
17+
## 1. Turn on the detection
1918

2019
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
2120

@@ -34,6 +33,19 @@ curl --request POST \
3433
--header "X-Auth-Key: <API_KEY>"
3534
```
3635

36+
</TabItem> <TabItem label="Terraform">
37+
38+
Use the `cloudflare_content_scanning` resource to enable malicious uploads detection for a zone. For example:
39+
40+
```terraform
41+
resource "cloudflare_content_scanning" "zone_malicious_uploads_example" {
42+
zone_id = "<ZONE_ID>"
43+
enabled = true
44+
}
45+
```
46+
47+
For more information, refer to the [Terraform Cloudflare provider documentation](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs).
48+
3749
</TabItem> </Tabs>
3850

3951
## 2. Validate the content scanning behavior
@@ -140,6 +152,17 @@ The above request will add the following expression to the current list of custo
140152
lookup_json_string(http.request.body.raw, "file")
141153
```
142154

155+
</TabItem> <TabItem label="Terraform">
156+
157+
Use the `cloudflare_content_scanning_expression` resource to add a custom scan expression. For example:
158+
159+
```terraform
160+
resource "cloudflare_content_scanning_expression" "mu_custom_scan_expression" {
161+
zone_id = <ZONE_ID>
162+
payload = "lookup_json_string(http.request.body.raw, \"file\")"
163+
}
164+
```
165+
143166
</TabItem> </Tabs>
144167

145168
The custom scan expression will scan any string found in an HTTP body with the following JSON string:

0 commit comments

Comments
 (0)