Rules
resource cloudflare_firewall_rule
cloudflare_firewall_rule
resource "cloudflare_firewall_rule" "example_firewall_rule" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
action = {
mode = "challenge"
response = {
body = "<error>This request has been rate-limited.</error>"
content_type = "text/xml"
}
timeout = 86400
}
filter = {
description = "Restrict access from these browsers on this address range."
expression = "(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.addr ne 172.16.22.155"
paused = false
ref = "FIL-100"
}
}
data cloudflare_firewall_rule
computed
action: String
The action to apply to a matched request. The log action is only available on an Enterprise plan.
cloudflare_firewall_rule
data "cloudflare_firewall_rule" "example_firewall_rule" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
rule_id = "372e67954025e0ba6aaa6d586b9e0b60"
}
data cloudflare_firewall_rules
optional
cloudflare_firewall_rules
data "cloudflare_firewall_rules" "example_firewall_rules" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
id = "372e67954025e0ba6aaa6d586b9e0b60"
action = "block"
description = "mir"
paused = false
}