-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[WAF, Terraform] Improve Terraform info and links from/to the WAF #19681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pedrosousa
merged 7 commits into
production
from
pedro/2025-02-03-waf-add-terraform-links
Feb 4, 2025
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4c6364f
[WAF, Terraform] Improve Terraform info and links from/to the WAF
pedrosousa 4cb4da6
Add link
pedrosousa 93e0b32
Link to Terraform from Transform Rules
pedrosousa c03f75c
Add Terraform example for Managed Transforms
pedrosousa 5796b53
Transform Rules: Link to Terraform examples
pedrosousa fbc35bc
Add some more links
pedrosousa 1a665ce
Update highlighted lines
pedrosousa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,17 @@ | ||
| --- | ||
| title: Rate limiting rules | ||
| title: Rate limiting rules configuration using Terraform | ||
| pcx_content_type: how-to | ||
| sidebar: | ||
| order: 4 | ||
| label: Rate limiting rules | ||
| head: | ||
| - tag: title | ||
| content: Configure rate limiting rules with Terraform | ||
| content: Rate limiting rules configuration using Terraform | ||
| --- | ||
|
|
||
| import { Details, Render } from "~/components"; | ||
|
|
||
| This page provides an example of creating a rate limiting rule in a zone using Terraform. | ||
|
|
||
| For more information on rate limiting rules, refer to [Rate limiting rules](/waf/rate-limiting-rules/) in the Cloudflare WAF documentation. | ||
| This page provides examples of creating [rate limiting rules](/waf/rate-limiting-rules/) in a zone or account using Terraform. | ||
|
|
||
| :::note | ||
|
|
||
|
|
@@ -31,7 +30,7 @@ For more information on configuring the previous version of rate limiting rules | |
|
|
||
| --- | ||
|
|
||
| ## Create a rate limiting rule | ||
| ## Create a rate limiting rule at the zone level | ||
|
|
||
| This example creates a rate limiting rule in zone with ID `<ZONE_ID>` blocking traffic that exceeds the configured rate: | ||
|
|
||
|
|
@@ -62,14 +61,15 @@ resource "cloudflare_ruleset" "zone_rl" { | |
|
|
||
| <Render file="add-new-rule" params={{ one: "rate limiting rule" }} /> <br /> | ||
|
|
||
| <Details header="Account-level example configuration"> | ||
| ## Create a rate limiting rule at the account level | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Promotes this collapsible section to a section-with-a-heading so that we can link to it. |
||
|
|
||
| :::note[Before you start] | ||
| :::note[Notes] | ||
|
|
||
| - Account-level rate limiting configuration requires an Enterprise plan with a paid add-on. | ||
| - [Account-level rate limiting configuration](/waf/account/) requires an Enterprise plan with a paid add-on. | ||
|
|
||
| - 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"`. | ||
| ::: | ||
|
|
||
| ::: | ||
|
|
||
| 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`. | ||
|
|
||
|
|
@@ -120,7 +120,7 @@ resource "cloudflare_ruleset" "account_rl_entrypoint" { | |
| } | ||
| ``` | ||
|
|
||
| </Details> | ||
| <Render file="add-new-rule" params={{ one: "rate limiting rule" }} /> <br /> | ||
|
|
||
| ## Create an advanced rate limiting rule | ||
|
|
||
|
|
||
9 changes: 4 additions & 5 deletions
9
src/content/docs/terraform/additional-configurations/transform-rules.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/content/docs/waf/account/custom-rulesets/link-create-terraform.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: Use Terraform | ||
| external_link: /terraform/additional-configurations/waf-custom-rules/#create-and-deploy-a-custom-ruleset | ||
| sidebar: | ||
| order: 4 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/content/docs/waf/account/managed-rulesets/link-create-terraform.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: Deploy using Terraform | ||
| external_link: /terraform/additional-configurations/waf-managed-rulesets/#deploy-managed-rulesets-at-the-account-level | ||
| sidebar: | ||
| order: 4 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/content/docs/waf/account/rate-limiting-rulesets/link-create-terraform.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: Create using Terraform | ||
| external_link: /terraform/additional-configurations/rate-limiting-rules/#create-a-rate-limiting-rule | ||
| sidebar: | ||
| order: 17 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: Create using Terraform | ||
| external_link: /terraform/additional-configurations/waf-custom-rules/ | ||
| sidebar: | ||
| order: 4 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: Deploy using Terraform | ||
| external_link: /terraform/additional-configurations/waf-managed-rulesets/ | ||
| sidebar: | ||
| order: 3 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/content/docs/waf/rate-limiting-rules/link-create-terraform.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| pcx_content_type: navigation | ||
| title: Create using Terraform | ||
| external_link: /terraform/additional-configurations/rate-limiting-rules/ | ||
| sidebar: | ||
| order: 16 | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes the first line consistent between pages (links to conceptual info from this sentence, and removes a sentence at the end of this section with the same purpose).