Skip to content

Commit 4c6364f

Browse files
committed
[WAF, Terraform] Improve Terraform info and links from/to the WAF
1 parent 92746dd commit 4c6364f

File tree

23 files changed

+100
-48
lines changed

23 files changed

+100
-48
lines changed

src/content/docs/terraform/additional-configurations/ddos-managed-rulesets.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
---
2-
title: DDoS managed rulesets
2+
title: DDoS managed rulesets configuration using Terraform
33
pcx_content_type: how-to
44
sidebar:
55
order: 3
6+
label: DDoS managed rulesets
67
head:
78
- tag: title
8-
content: Configure DDoS managed rulesets with Terraform
9+
content: DDoS managed rulesets configuration using Terraform
910
---
1011

11-
import { Render } from "~/components";
12+
import { Render, RuleID } from "~/components";
1213

13-
This page provides examples of configuring DDoS managed rulesets in your zone or account using Terraform. It covers the following configurations:
14+
This page provides examples of configuring [DDoS managed rulesets](/ddos-protection/managed-rulesets/) in your zone or account using Terraform. It covers the following configurations:
1415

1516
- [Example: Configure HTTP DDoS Attack Protection](#example-configure-http-ddos-attack-protection)
1617
- [Example: Configure Network-layer DDoS Attack Protection](#example-configure-network-layer-ddos-attack-protection)
1718
- [Use case: Mitigate large HTTP DDoS attacks and monitor flagged traffic](#use-case-mitigate-large-http-ddos-attacks-and-monitor-flagged-traffic)
1819

1920
DDoS managed rulesets are always enabled. Depending on your Cloudflare services, you may be able to adjust their behavior.
2021

21-
For more information on DDoS managed rulesets, refer to [Managed rulesets](/ddos-protection/managed-rulesets/) in the Cloudflare DDoS Protection documentation. For more information on deploying and configuring rulesets using the Rulesets API, refer to [Work with managed rulesets](/ruleset-engine/managed-rulesets/) in the Ruleset Engine documentation.
22+
For more information on deploying and configuring rulesets using the Rulesets API, refer to [Work with managed rulesets](/ruleset-engine/managed-rulesets/) in the Ruleset Engine documentation.
2223

2324
## Before you start
2425

@@ -34,7 +35,7 @@ For more information on DDoS managed rulesets, refer to [Managed rulesets](/ddos
3435

3536
## Example: Configure HTTP DDoS Attack Protection
3637

37-
This example configures the [HTTP DDoS Attack Protection](/ddos-protection/managed-rulesets/http/) managed ruleset for a zone using Terraform, changing the sensitivity level of rule with ID fdfdac75430c4c47a959592f0aa5e68a to `low`.
38+
This example configures the [HTTP DDoS Attack Protection](/ddos-protection/managed-rulesets/http/) managed ruleset for a zone using Terraform, changing the sensitivity level of rule with ID <RuleID id="fdfdac75430c4c47a959592f0aa5e68a" /> to `low`.
3839

3940
<Render file="v4-code-snippets" />
4041

@@ -70,7 +71,7 @@ For more information about HTTP DDoS Attack Protection, refer to [HTTP DDoS Atta
7071

7172
## Example: Configure Network-layer DDoS Attack Protection
7273

73-
This example configures the [Network-layer DDoS Attack Protection](/ddos-protection/managed-rulesets/network/) managed ruleset for an account using Terraform, changing the sensitivity level of rule with ID 599dab0942ff4898ac1b7797e954e98b to `low` using an override.
74+
This example configures the [Network-layer DDoS Attack Protection](/ddos-protection/managed-rulesets/network/) managed ruleset for an account using Terraform, changing the sensitivity level of rule with ID <RuleID id="599dab0942ff4898ac1b7797e954e98b" /> to `low` using an override.
7475

7576
:::caution[Important]
7677

src/content/docs/terraform/additional-configurations/rate-limiting-rules.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
2-
title: Rate limiting rules
2+
title: Rate limiting rules configuration using Terraform
33
pcx_content_type: how-to
44
sidebar:
55
order: 4
6+
label: Rate limiting rules
67
head:
78
- tag: title
8-
content: Configure rate limiting rules with Terraform
9+
content: Rate limiting rules configuration using Terraform
910
---
1011

1112
import { Details, Render } from "~/components";
1213

13-
This page provides an example of creating a rate limiting rule in a zone using Terraform.
14-
15-
For more information on rate limiting rules, refer to [Rate limiting rules](/waf/rate-limiting-rules/) in the Cloudflare WAF documentation.
14+
This page provides examples of creating [rate limiting rules](/waf/rate-limiting-rules/) in a zone or account using Terraform.
1615

1716
:::note
1817

@@ -31,7 +30,7 @@ For more information on configuring the previous version of rate limiting rules
3130

3231
---
3332

34-
## Create a rate limiting rule
33+
## Create a rate limiting rule at the zone level
3534

3635
This example creates a rate limiting rule in zone with ID `<ZONE_ID>` blocking traffic that exceeds the configured rate:
3736

@@ -62,14 +61,15 @@ resource "cloudflare_ruleset" "zone_rl" {
6261

6362
<Render file="add-new-rule" params={{ one: "rate limiting rule" }} /> <br />
6463

65-
<Details header="Account-level example configuration">
64+
## Create a rate limiting rule at the account level
6665

67-
:::note[Before you start]
66+
:::note[Notes]
6867

69-
- Account-level rate limiting configuration requires an Enterprise plan with a paid add-on.
68+
- [Account-level rate limiting configuration](/waf/account/) requires an Enterprise plan with a paid add-on.
7069

7170
- Custom rulesets deployed at the account level will only apply to incoming traffic of zones on an Enterprise plan. The expression of your `execute` rule must end with `and cf.zone.plan eq "ENT"`.
72-
:::
71+
72+
:::
7373

7474
This example defines a [custom ruleset](/ruleset-engine/custom-rulesets/) with a single rate limiting rule in account with ID `<ACCOUNT_ID>` that blocks traffic for the `/api/` path exceeding the configured rate. The second `cloudflare_ruleset` resource defines an `execute` rule that deploys the custom ruleset for traffic addressed at `example.com`.
7575

@@ -120,7 +120,7 @@ resource "cloudflare_ruleset" "account_rl_entrypoint" {
120120
}
121121
```
122122

123-
</Details>
123+
<Render file="add-new-rule" params={{ one: "rate limiting rule" }} /> <br />
124124

125125
## Create an advanced rate limiting rule
126126

src/content/docs/terraform/additional-configurations/transform-rules.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
---
2-
title: Transform Rules
2+
title: Transform Rules configuration using Terraform
33
pcx_content_type: how-to
44
sidebar:
55
order: 6
6+
label: Transform Rules
67
head:
78
- tag: title
8-
content: Configure Transform Rules with Terraform
9+
content: Transform Rules configuration using Terraform
910
---
1011

1112
import { Render } from "~/components";
1213

13-
This page provides examples of creating Transform Rules in a zone using Terraform. The examples cover the following scenarios:
14+
This page provides examples of creating [Transform Rules](/rules/transform/) in a zone using Terraform. The examples cover the following scenarios:
1415

1516
- [Create a Rewrite URL Rule](#create-a-rewrite-url-rule)
1617
- [Create an HTTP Request Header Modification Rule](#create-an-http-request-header-modification-rule)
1718

18-
For more information on Transform Rules, refer to [Transform Rules](/rules/transform/).
19-
2019
## Before you start
2120

2221
### Obtain the necessary account or zone IDs

src/content/docs/terraform/additional-configurations/waf-custom-rules.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
2-
title: WAF custom rules
2+
title: WAF custom rules configuration using Terraform
33
pcx_content_type: how-to
44
sidebar:
55
order: 5
6+
label: WAF custom rules
67
head:
78
- tag: title
8-
content: Configure WAF custom rules with Terraform
9+
content: WAF custom rules configuration using Terraform
910
---
1011

1112
import { Render, GlossaryTooltip } from "~/components";
1213

13-
This page provides examples of creating WAF custom rules in a zone or account using Terraform. The examples cover the following scenarios:
14+
This page provides examples of creating [WAF custom rules](/waf/custom-rules/) in a zone or account using Terraform. The examples cover the following scenarios:
1415

1516
- Zone-level configurations:
1617
- [Add a custom rule to a zone](#add-a-custom-rule-to-a-zone)
@@ -20,8 +21,6 @@ This page provides examples of creating WAF custom rules in a zone or account us
2021
- [Create and deploy a custom ruleset](#create-and-deploy-a-custom-ruleset)
2122
- [Add a custom rule checking for exposed credentials](#add-a-custom-rule-checking-for-exposed-credentials)
2223

23-
For more information on custom rules, refer to [Custom rules](/waf/custom-rules/) in the Cloudflare WAF documentation.
24-
2524
## Before you start
2625

2726
### Obtain the necessary account or zone IDs

src/content/docs/terraform/additional-configurations/waf-managed-rulesets.mdx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
---
2-
title: WAF Managed Rules
2+
title: WAF Managed Rules configuration using Terraform
33
pcx_content_type: how-to
44
sidebar:
55
order: 2
6+
label: WAF Managed Rules
67
head:
78
- tag: title
8-
content: Configure WAF Managed Rules with Terraform
9+
content: WAF Managed Rules configuration using Terraform
910
---
1011

1112
import { Details, Render, RuleID } from "~/components";
1213

13-
This page provides examples of deploying and configuring WAF Managed Rules in your zone or account using Terraform. It covers the following configurations:
14+
This page provides examples of deploying and configuring [WAF Managed Rules](/waf/managed-rules/) in your zone or account using Terraform. It covers the following configurations:
1415

15-
- [Deploy managed rulesets](#deploy-managed-rulesets)
16+
- [Deploy managed rulesets at the zone level](#deploy-managed-rulesets-at-the-zone-level)
17+
- [Deploy managed rulesets at the account level](#deploy-managed-rulesets-at-the-account-level)
1618
- [Configure skip rules](#configure-skip-rules)
1719
- [Configure payload logging](#configure-payload-logging)
1820
- [Configure overrides](#configure-overrides)
1921
- [Configure the OWASP paranoia level, score threshold, and action](#configure-the-owasp-paranoia-level-score-threshold-and-action)
2022

21-
For more information on WAF Managed Rules, refer to [WAF Managed Rules](/waf/managed-rules/) in the Cloudflare WAF documentation. For more information on deploying and configuring rulesets using the Rulesets API, refer to [Work with managed rulesets](/ruleset-engine/managed-rulesets/) in the Ruleset Engine documentation.
23+
For more information on deploying and configuring rulesets using the Rulesets API, refer to [Work with managed rulesets](/ruleset-engine/managed-rulesets/) in the Ruleset Engine documentation.
2224

2325
## Before you start
2426

2527
### Obtain the necessary account, zone, and managed ruleset IDs
2628

2729
<Render file="find-ids-managed-rulesets" />
2830

31+
The IDs of WAF managed rulesets are also available in the [WAF Managed Rules](/waf/managed-rules/#managed-rulesets) page.
32+
2933
### Import or delete existing rulesets
3034

3135
<Render file="import-delete-existing-rulesets" />
3236

3337
---
3438

35-
## Deploy managed rulesets
39+
## Deploy managed rulesets at the zone level
3640

3741
The following example deploys two managed rulesets to the zone with ID `<ZONE_ID>` using Terraform, using a `cloudflare_ruleset` resource with two rules that execute the managed rulesets.
3842

@@ -71,14 +75,15 @@ resource "cloudflare_ruleset" "zone_level_managed_waf" {
7175
}
7276
```
7377

74-
<Details header="Account-level example configuration">
78+
## Deploy managed rulesets at the account level
7579

76-
:::note[Before you start]
80+
:::note[Notes]
7781

78-
- Account-level WAF configuration requires an Enterprise plan with a paid add-on.
82+
- [Account-level WAF configuration](/waf/account/) requires an Enterprise plan with a paid add-on.
7983

8084
- Managed rulesets deployed at the account level will only apply to incoming traffic of zones on an Enterprise plan. The expression of your `execute` rule must end with `and cf.zone.plan eq "ENT"`.
81-
:::
85+
86+
:::
8287

8388
The following example deploys two managed rulesets to the account with ID `<ACCOUNT_ID>` using Terraform, using a `cloudflare_ruleset` resource with two rules that execute the managed rulesets for two hostnames belonging to Enterprise zones.
8489

@@ -116,8 +121,6 @@ resource "cloudflare_ruleset" "account_level_managed_waf" {
116121
}
117122
```
118123

119-
</Details>
120-
121124
## Configure skip rules
122125

123126
The following example adds two [skip rules](/waf/managed-rules/waf-exceptions/) (or exceptions) for the Cloudflare Managed Ruleset:

src/content/docs/waf/account/custom-rulesets/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ Refer to the following pages for more information on working with custom ruleset
1717

1818
- [Work with custom rulesets in the dashboard](/waf/account/custom-rulesets/create-dashboard/)
1919
- [Work with custom rulesets using the API](/waf/account/custom-rulesets/create-api/)
20+
21+
For Terraform examples, refer to [WAF custom rules configuration using Terraform](/terraform/additional-configurations/waf-custom-rules/#create-and-deploy-a-custom-ruleset).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Use Terraform
4+
external_link: /terraform/additional-configurations/waf-custom-rules/#create-and-deploy-a-custom-ruleset
5+
sidebar:
6+
order: 4
7+
---

src/content/docs/waf/account/managed-rulesets/link-create-exceptions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ pcx_content_type: navigation
33
title: Create exceptions
44
external_link: /waf/managed-rules/waf-exceptions/
55
sidebar:
6-
order: 4
6+
order: 5
77
---
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Deploy using Terraform
4+
external_link: /terraform/additional-configurations/waf-managed-rulesets/#deploy-managed-rulesets-at-the-account-level
5+
sidebar:
6+
order: 4
7+
---

src/content/docs/waf/account/rate-limiting-rulesets/create-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: how-to
33
title: Create a rate limiting ruleset via API
44
sidebar:
5-
order: 15
5+
order: 16
66
label: Create via API
77
head:
88
- tag: title

0 commit comments

Comments
 (0)