-
Notifications
You must be signed in to change notification settings - Fork 625
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
Cloudflare Ruleset Resource - Custom WAF Rule - Skip #2724
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
Added the requested output in the "Link to debug output" section. |
that is not the expected debug output. you will need to prefix the terraform operation with |
Issue#1390 references what I needed to create the skip ruleset: I will report that I ran into a bug in the provider. Here is the error I received when successfully creating the ruleset: ╷ |
EDIT: Found the solution!! @jhough-teleflora Using a combo of the Cloudflare API docs and the Terraform module docs I was also not able to create a custom rule that skips "all remaining custom rules". In the Cloudflare docs the Skip action is applied to phases and products, not a ruleset or list of rulesets. If I try to add the custom rules phase, I get an error. Which makes sense as I'm adding a rule to the phase and then trying to skip that same phase. 🤷♂️
|
Marking this issue as stale due to 30 days of inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 7 days it will automatically be closed. Maintainers can also remove the |
This issue was closed because it has been stalled for 7 days with no activity. |
I couldn't find a terraform equivalent to "Skip all remaining rules" on the CF dashboard. But below iteration code of terraform inside the
|
Hi, I'm working on Cloudflare WAF rules at the zone level. I've created a primary rule to "Deny All," which blocks all traffic to the zone. Now, I want to add another rule that allows requests from a specific IP range for a particular DNS record. However, when I try to create this additional custom WAF rule at the zone level, it isn't being created successfully. ` This is Deny All
This is Skip Rule
|
@devang704 - If those are the exact values you are using for the rules then the issue is with your allow rule. The source IP address is not a valid IP address -> "123.185.456.169" 255 is the highest value that you can have for any of the octets of an IP address. |
Hi This is not the real IP address I just put random IP, The error I am getting is below. ` with cloudflare_ruleset.zone_custom_firewall_skip, A similar configuration with rules already exists and overwriting will have |
That error is because you are trying to create rules that already exist in Cloudflare. So you can either import the rules that already exist into your tfstates file, or you can delete the custom WAF rules and then run terraform. |
Confirmation
Terraform and Cloudflare provider version
Terraform v1.5.5
on windows_amd64
Affected resource(s)
cloudflare_ruleset
Terraform configuration files
Link to debug output
https://gist.github.com/jhough-teleflora/53ced569d8f5be375abb8748ede39d92
Panic output
No response
Expected output
I expected that the custom WAF rule would be created with the provided configuration.
A rule with the name "Test Rule", action would be "skip".
The end goal is to create a custom rule that skips the remaining custom rules once the expression is met.
In the web console, this would be the equivalent of selecting "Skip" as the action and checking the "All remaining custom rules" box under the "WAF components to skip" section.
Actual output
After Terraform attempted the modification, Terraform threw an error saying that the ruleset ID given was an "unknown variant".
Steps to reproduce
Additional factoids
I have tried the above process with deleting the "firewall_custom" ruleset through the api first, then creating this rule and had the same issue.
This could be that I was missing the documentation for this but I could not find any documentation for this specific use case.
References
No response
The text was updated successfully, but these errors were encountered: