Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ import { Details, Render } from "~/components";

This page provides examples of creating [rate limiting rules](/waf/rate-limiting-rules/) in a zone or account using Terraform.

:::note
If you are using the Cloudflare API, refer to the following resources:

- [Create a rate limiting rule via API](/waf/rate-limiting-rules/create-api/)
- [Create a rate limiting ruleset via API](/waf/account/rate-limiting-rulesets/create-api/)

:::note
For more information on configuring the previous version of rate limiting rules in Terraform, refer to the [`cloudflare_rate_limit` resource](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/rate_limit) in the Terraform documentation.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ This page provides examples of creating [WAF custom rules](/waf/custom-rules/) i

The WAF documentation includes additional Terraform examples — refer to [More resources](#more-resources).

If you are using the Cloudflare API, refer to the following resources in the WAF documentation:

- [Create a custom rule via API](/waf/custom-rules/create-api/)
- [Create a custom ruleset using the API](/waf/account/custom-rulesets/create-api/)

For more information on deploying and configuring custom rulesets using the Rulesets API, refer to [Work with custom rulesets](/ruleset-engine/custom-rulesets/) in the Ruleset Engine documentation.

## Before you start

### Obtain the necessary account or zone IDs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ This page provides examples of deploying and configuring [WAF Managed Rules](/wa
- [Configure overrides](#configure-overrides)
- [Configure the OWASP paranoia level, score threshold, and action](#configure-the-owasp-paranoia-level-score-threshold-and-action)

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.
If you are using the Cloudflare API, refer to the following resources:

- [Deploy a WAF managed ruleset via API](/waf/managed-rules/deploy-api/)
- [Deploy a WAF managed ruleset via API (account)](/waf/account/managed-rulesets/deploy-api/)

For more information on deploying and configuring managed rulesets using the Rulesets API, refer to [Work with managed rulesets](/ruleset-engine/managed-rulesets/) in the Ruleset Engine documentation.

## Before you start

Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/waf/account/custom-rulesets/create-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This feature requires an Enterprise plan with a paid add-on.

To deploy custom rules at the account level, you must create a custom ruleset with one or more rules. Use the [Rulesets API](/ruleset-engine/rulesets-api/) to work with custom rulesets using the API.

If you are using Terraform, refer to [WAF custom rules configuration using Terraform](/terraform/additional-configurations/waf-custom-rules/#create-and-deploy-a-custom-ruleset).

## Procedure

To deploy a custom ruleset in your account, follow these general steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Use the [Rulesets API](/ruleset-engine/rulesets-api/) to deploy a WAF managed ru

The [WAF Managed Rules](/waf/managed-rules/#managed-rulesets) page includes the IDs of the different WAF managed rulesets. You will need this information when deploying rulesets via API.

If you are using Terraform, refer to [WAF Managed Rules configuration using Terraform](/terraform/additional-configurations/waf-managed-rulesets/#deploy-managed-rulesets-at-the-account-level).

## Example

<Render file="managed-rulesets/api-account-example" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ At the API level, a rate limiting ruleset is a regular [custom ruleset](/waf/acc

Each rate limiting rule contains a `ratelimit` object with the rate limiting configuration. Refer to [Rate limiting parameters](/waf/rate-limiting-rules/parameters/) for more information on this object and its parameters.

If you are using Terraform, refer to [Rate limiting rules configuration using Terraform](/terraform/additional-configurations/rate-limiting-rules/#create-a-rate-limiting-rule-at-the-account-level).

## Procedure

To deploy a rate limiting ruleset in your account, follow these general steps:
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/waf/custom-rules/create-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Use the [Rulesets API](/ruleset-engine/rulesets-api/) to create a custom rule vi

You must deploy custom rules to the `http_request_firewall_custom` [phase entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset).

If you are using Terraform, refer to [WAF custom rules configuration using Terraform](/terraform/additional-configurations/waf-custom-rules/).

## Create a custom rule

<Render
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/waf/managed-rules/deploy-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Deploy WAF managed rulesets to the `http_request_firewall_managed` phase. Other

The [WAF Managed Rules](/waf/managed-rules/#managed-rulesets) page includes the IDs of the different WAF managed rulesets. You will need this information when deploying the rulesets via API.

If you are using Terraform, refer to [WAF Managed Rules configuration using Terraform](/terraform/additional-configurations/waf-managed-rulesets/).

## Example

<Render file="managed-rulesets/api-zone-example" />
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/waf/rate-limiting-rules/create-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ You must deploy rate limiting rules to the `http_ratelimit` [phase entry point r

Rate limiting rules must appear at the end of the rules list.

If you are using Terraform, refer to [Rate limiting rules configuration using Terraform](/terraform/additional-configurations/rate-limiting-rules/).

## Create a rate limiting rule

<Render
Expand Down