Skip to content
Start here

Filters

resource cloudflare_filter

required Expand Collapse
zone_id: String

Defines an identifier.

body: List[Attributes]
id: String

The unique identifier of the filter.

description?: String

An informative summary of the filter.

expression?: String

The filter expression. For more information, refer to Expressions.

paused?: Bool

When true, indicates that the filter is currently paused.

ref?: String

A short reference tag. Allows you to select related filters.

optional Expand Collapse
description?: String

An informative summary of the filter.

expression?: String

The filter expression. For more information, refer to Expressions.

paused?: Bool

When true, indicates that the filter is currently paused.

ref?: String

A short reference tag. Allows you to select related filters.

computed Expand Collapse
id: String

The unique identifier of the filter.

cloudflare_filter

resource "cloudflare_filter" "example_filter" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  body = [{
    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_filter

required Expand Collapse
zone_id: String

Defines an identifier.

optional Expand Collapse
filter_id?: String

The unique identifier of the filter.

filter?: Attributes
id?: String

The unique identifier of the filter.

description?: String

A case-insensitive string to find in the description.

expression?: String

A case-insensitive string to find in the expression.

paused?: Bool

When true, indicates that the filter is currently paused.

ref?: String

The filter ref (a short reference tag) to search for. Must be an exact match.

computed Expand Collapse
id: String

The unique identifier of the filter.

description: String

An informative summary of the filter.

expression: String

The filter expression. For more information, refer to Expressions.

paused: Bool

When true, indicates that the filter is currently paused.

ref: String

A short reference tag. Allows you to select related filters.

cloudflare_filter

data "cloudflare_filter" "example_filter" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  filter_id = "372e67954025e0ba6aaa6d586b9e0b61"
}

data cloudflare_filters

required Expand Collapse
zone_id: String

Defines an identifier.

optional Expand Collapse
description?: String

A case-insensitive string to find in the description.

expression?: String

A case-insensitive string to find in the expression.

id?: String

The unique identifier of the filter.

paused?: Bool

When true, indicates that the filter is currently paused.

ref?: String

The filter ref (a short reference tag) to search for. Must be an exact match.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

The unique identifier of the filter.

description: String

An informative summary of the filter.

expression: String

The filter expression. For more information, refer to Expressions.

paused: Bool

When true, indicates that the filter is currently paused.

ref: String

A short reference tag. Allows you to select related filters.

cloudflare_filters

data "cloudflare_filters" "example_filters" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  id = "372e67954025e0ba6aaa6d586b9e0b61"
  description = "browsers"
  expression = "php"
  paused = false
  ref = "FIL-100"
}