Rate Limits
resource cloudflare_rate_limit
required
period: Float64
The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.
cloudflare_rate_limit
resource "cloudflare_rate_limit" "example_rate_limit" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
action = {
mode = "challenge"
response = {
body = "<error>This request has been rate-limited.</error>"
content_type = "text/xml"
}
timeout = 86400
}
match = {
headers = [{
name = "Cf-Cache-Status"
op = "ne"
value = "HIT"
}]
request = {
methods = ["GET", "POST"]
schemes = ["HTTP", "HTTPS"]
url = "*.example.org/path*"
}
response = {
origin_traffic = true
}
}
period = 900
threshold = 60
}
data cloudflare_rate_limit
required
computed
description: String
An informative summary of the rule. This value is sanitized and any tags will be removed.
period: Float64
The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.
cloudflare_rate_limit
data "cloudflare_rate_limit" "example_rate_limit" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
rate_limit_id = "372e67954025e0ba6aaa6d586b9e0b59"
}