Filter expressions that can be referenced across multiple features, e.g. Firewall Rules. See what is a filter for more details and available fields and operators.
resource "cloudflare_filter" "wordpress" {
zone_id = "0da42c8d2132a9ddaf714f9e7c920711"
description = "Wordpress break-in attempts that are outside of the office"
expression = "(http.request.uri.path ~ \".*wp-login.php\" or http.request.uri.path ~ \".*xmlrpc.php\") and ip.src ne 192.0.2.1"
}
expression
(String) The filter expression to be used.zone_id
(String) The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.description
(String) A note that you can use to describe the purpose of the filter.paused
(Boolean) Whether this filter is currently paused.ref
(String) Short reference tag to quickly select related rules.id
(String) The ID of this resource.Import is supported using the following syntax:
$ terraform import cloudflare_filter.example <zone_id>/<filter_id>