Skip to content
Start here

Email Routing

resource cloudflare_email_routing_settings

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Email Routing settings identifier.

created: Time

The date and time the settings have been created.

enabled: Bool

State of the zone settings for Email Routing.

modified: Time

The date and time the settings have been modified.

name: String

Domain of your zone.

skip_wizard: Bool

Flag to check if the user skipped the configuration wizard.

status: String

Show the state of your account, and the type or configuration error.

Deprecatedtag: String

Email Routing settings tag. (Deprecated, replaced by Email Routing settings identifier)

cloudflare_email_routing_settings

resource "cloudflare_email_routing_settings" "example_email_routing_settings" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_email_routing_settings

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

created: Time

The date and time the settings have been created.

enabled: Bool

State of the zone settings for Email Routing.

modified: Time

The date and time the settings have been modified.

name: String

Domain of your zone.

skip_wizard: Bool

Flag to check if the user skipped the configuration wizard.

status: String

Show the state of your account, and the type or configuration error.

Deprecatedtag: String

Email Routing settings tag. (Deprecated, replaced by Email Routing settings identifier)

cloudflare_email_routing_settings

data "cloudflare_email_routing_settings" "example_email_routing_settings" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

Email RoutingDNS

resource cloudflare_email_routing_dns

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
name?: String

Domain of your zone.

computed Expand Collapse
id: String

Identifier.

created: Time

The date and time the settings have been created.

enabled: Bool

State of the zone settings for Email Routing.

modified: Time

The date and time the settings have been modified.

skip_wizard: Bool

Flag to check if the user skipped the configuration wizard.

status: String

Show the state of your account, and the type or configuration error.

success: Bool

Whether the API call was successful.

Deprecatedtag: String

Email Routing settings tag. (Deprecated, replaced by Email Routing settings identifier)

errors: List[Attributes]
code: Int64
message: String
documentation_url: String
source: Attributes
pointer: String
messages: List[Attributes]
code: Int64
message: String
documentation_url: String
source: Attributes
pointer: String
result: Attributes
errors: List[Attributes]
code: String
missing: Attributes

List of records needed to enable an Email Routing zone.

content: String

DNS record content.

name: String

DNS record name (or @ for the zone apex).

priority: Float64

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

ttl: Float64

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

type: String

DNS record type.

record: List[Attributes]
content: String

DNS record content.

name: String

DNS record name (or @ for the zone apex).

priority: Float64

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

ttl: Float64

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

type: String

DNS record type.

content: String

DNS record content.

name: String

DNS record name (or @ for the zone apex).

priority: Float64

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

ttl: Float64

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

type: String

DNS record type.

result_info: Attributes
email_routing_dns_count: Float64

Total number of results for the requested service.

page: Float64

Current page within paginated list of results.

per_page: Float64

Number of results per page of results.

total_count: Float64

Total results available without any search parameters.

total_pages: Float64

The number of total pages in the entire result set.

cloudflare_email_routing_dns

resource "cloudflare_email_routing_dns" "example_email_routing_dns" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  name = "example.net"
}

data cloudflare_email_routing_dns

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
subdomain?: String

Domain of your zone.

computed Expand Collapse
id: String

Identifier.

success: Bool

Whether the API call was successful.

errors: List[Attributes]
code: Int64
message: String
documentation_url: String
source: Attributes
pointer: String
messages: List[Attributes]
code: Int64
message: String
documentation_url: String
source: Attributes
pointer: String
result: Attributes
errors: List[Attributes]
code: String
missing: Attributes

List of records needed to enable an Email Routing zone.

content: String

DNS record content.

name: String

DNS record name (or @ for the zone apex).

priority: Float64

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

ttl: Float64

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

type: String

DNS record type.

record: List[Attributes]
content: String

DNS record content.

name: String

DNS record name (or @ for the zone apex).

priority: Float64

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

ttl: Float64

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

type: String

DNS record type.

content: String

DNS record content.

name: String

DNS record name (or @ for the zone apex).

priority: Float64

Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred.

ttl: Float64

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

type: String

DNS record type.

result_info: Attributes
email_routing_dns_count: Float64

Total number of results for the requested service.

page: Float64

Current page within paginated list of results.

per_page: Float64

Number of results per page of results.

total_count: Float64

Total results available without any search parameters.

total_pages: Float64

The number of total pages in the entire result set.

cloudflare_email_routing_dns

data "cloudflare_email_routing_dns" "example_email_routing_dns" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  subdomain = "example.net"
}

Email RoutingRules

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
}

Email RoutingRulesCatch 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"
}

Email RoutingAddresses

resource cloudflare_email_routing_address

required Expand Collapse
account_id: String

Identifier.

email: String

The contact email address of the user.

computed Expand Collapse
id: String

Destination address identifier.

created: Time

The date and time the destination address has been created.

modified: Time

The date and time the destination address was last modified.

Deprecatedtag: String

Destination address tag. (Deprecated, replaced by destination address identifier)

verified: Time

The date and time the destination address has been verified. Null means not verified yet.

cloudflare_email_routing_address

resource "cloudflare_email_routing_address" "example_email_routing_address" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  email = "user@example.com"
}

data cloudflare_email_routing_address

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
destination_address_identifier?: String

Destination address identifier.

filter?: Attributes
direction?: String

Sorts results in an ascending or descending order.

verified?: Bool

Filter by verified destination addresses.

computed Expand Collapse
id: String

Destination address identifier.

created: Time

The date and time the destination address has been created.

email: String

The contact email address of the user.

modified: Time

The date and time the destination address was last modified.

Deprecatedtag: String

Destination address tag. (Deprecated, replaced by destination address identifier)

verified: Time

The date and time the destination address has been verified. Null means not verified yet.

cloudflare_email_routing_address

data "cloudflare_email_routing_address" "example_email_routing_address" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  destination_address_identifier = "ea95132c15732412d22c1476fa83f27a"
}

data cloudflare_email_routing_addresses

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
direction?: String

Sorts results in an ascending or descending order.

verified?: Bool

Filter by verified destination addresses.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Destination address identifier.

created: Time

The date and time the destination address has been created.

email: String

The contact email address of the user.

modified: Time

The date and time the destination address was last modified.

Deprecatedtag: String

Destination address tag. (Deprecated, replaced by destination address identifier)

verified: Time

The date and time the destination address has been verified. Null means not verified yet.

cloudflare_email_routing_addresses

data "cloudflare_email_routing_addresses" "example_email_routing_addresses" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
}