Skip to content
Start here

Rules

resource cloudflare_email_routing_rule

required Expand Collapse
zone_id: String

Identifier.

actions: List[Attributes]

List actions patterns.

type: String

Type of supported action.

value?: List[String]
matchers: List[Attributes]

Matching patterns to forward to your actions.

type: String

Type of matcher.

field?: String

Field for type matcher.

value?: String

Value for matcher.

optional Expand Collapse
name?: String

Routing rule name.

enabled?: Bool

Routing rule status.

priority?: Float64

Priority of the routing rule.

computed Expand Collapse
id: String

Routing rule identifier.

Deprecatedtag: String

Routing rule tag. (Deprecated, replaced by routing rule identifier)

cloudflare_email_routing_rule

resource "cloudflare_email_routing_rule" "example_email_routing_rule" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  actions = [{
    type = "forward"
    value = ["destinationaddress@example.net"]
  }]
  matchers = [{
    type = "literal"
    field = "to"
    value = "test@example.com"
  }]
  enabled = true
  name = "Send to user@example.net rule."
  priority = 0
}

data cloudflare_email_routing_rule

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
rule_identifier?: String

Routing rule identifier.

filter?: Attributes
enabled?: Bool

Filter by enabled routing rules.

computed Expand Collapse
id: String

Routing rule identifier.

enabled: Bool

Routing rule status.

name: String

Routing rule name.

priority: Float64

Priority of the routing rule.

Deprecatedtag: String

Routing rule tag. (Deprecated, replaced by routing rule identifier)

actions: List[Attributes]

List actions patterns.

type: String

Type of supported action.

value: List[String]
matchers: List[Attributes]

Matching patterns to forward to your actions.

type: String

Type of matcher.

field: String

Field for type matcher.

value: String

Value for matcher.

cloudflare_email_routing_rule

data "cloudflare_email_routing_rule" "example_email_routing_rule" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  rule_identifier = "a7e6fb77503c41d8a7f3113c6918f10c"
}

data cloudflare_email_routing_rules

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
enabled?: Bool

Filter by enabled routing rules.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Routing rule identifier.

actions: List[Attributes]

List actions patterns.

type: String

Type of supported action.

value: List[String]
enabled: Bool

Routing rule status.

matchers: List[Attributes]

Matching patterns to forward to your actions.

type: String

Type of matcher.

field: String

Field for type matcher.

value: String

Value for matcher.

name: String

Routing rule name.

priority: Float64

Priority of the routing rule.

Deprecatedtag: String

Routing rule tag. (Deprecated, replaced by routing rule identifier)

cloudflare_email_routing_rules

data "cloudflare_email_routing_rules" "example_email_routing_rules" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  enabled = true
}

RulesCatch Alls

resource cloudflare_email_routing_catch_all

required Expand Collapse
zone_id: String

Identifier.

actions: List[Attributes]

List actions for the catch-all routing rule.

type: String

Type of action for catch-all rule.

value?: List[String]
matchers: List[Attributes]

List of matchers for the catch-all routing rule.

type: String

Type of matcher. Default is 'all'.

optional Expand Collapse
name?: String

Routing rule name.

enabled?: Bool

Routing rule status.

computed Expand Collapse
id: String

Identifier.

Deprecatedtag: String

Routing rule tag. (Deprecated, replaced by routing rule identifier)

cloudflare_email_routing_catch_all

resource "cloudflare_email_routing_catch_all" "example_email_routing_catch_all" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  actions = [{
    type = "forward"
    value = ["destinationaddress@example.net"]
  }]
  matchers = [{
    type = "all"
  }]
  enabled = true
  name = "Send to user@example.net rule."
}

data cloudflare_email_routing_catch_all

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

enabled: Bool

Routing rule status.

name: String

Routing rule name.

Deprecatedtag: String

Routing rule tag. (Deprecated, replaced by routing rule identifier)

actions: List[Attributes]

List actions for the catch-all routing rule.

type: String

Type of action for catch-all rule.

value: List[String]
matchers: List[Attributes]

List of matchers for the catch-all routing rule.

type: String

Type of matcher. Default is 'all'.

cloudflare_email_routing_catch_all

data "cloudflare_email_routing_catch_all" "example_email_routing_catch_all" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}