Skip to content
Start here

Settings

SettingsZone

resource cloudflare_zone_dns_settings

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
flatten_all_cnames?: Bool

Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.

foundation_dns?: Bool

Whether to enable Foundation DNS Advanced Nameservers on the zone.

multi_provider?: Bool

Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.

ns_ttl?: Float64

The time to live (TTL) of the zone's nameserver (NS) records.

secondary_overrides?: Bool

Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.

zone_mode?: String

Whether the zone mode is a regular or CDN/DNS only zone.

internal_dns?: Attributes

Settings for this internal zone.

reference_zone_id?: String

The ID of the zone to fallback to.

nameservers?: Attributes

Settings determining the nameservers through which the zone should be available.

ns_set?: Int64

Configured nameserver set to be used for this zone

type?: String

Nameserver type

soa?: Attributes

Components of the zone's SOA record.

expire?: Float64

Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.

min_ttl?: Float64

The time to live (TTL) for negative caching of records within the zone.

mname?: String

The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.

refresh?: Float64

Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.

retry?: Float64

Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.

rname?: String

The email address of the zone administrator, with the first label representing the local part of the email address.

ttl?: Float64

The time to live (TTL) of the SOA record itself.

cloudflare_zone_dns_settings

resource "cloudflare_zone_dns_settings" "example_zone_dns_settings" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  flatten_all_cnames = false
  foundation_dns = false
  internal_dns = {
    reference_zone_id = "reference_zone_id"
  }
  multi_provider = false
  nameservers = {
    ns_set = 1
    type = "cloudflare.standard"
  }
  ns_ttl = 86400
  secondary_overrides = false
  soa = {
    expire = 604800
    min_ttl = 1800
    mname = "kristina.ns.cloudflare.com"
    refresh = 10000
    retry = 2400
    rname = "admin.example.com"
    ttl = 3600
  }
  zone_mode = "dns_only"
}

data cloudflare_zone_dns_settings

required Expand Collapse
zone_id: String

Identifier.

computed Expand Collapse
flatten_all_cnames: Bool

Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.

foundation_dns: Bool

Whether to enable Foundation DNS Advanced Nameservers on the zone.

multi_provider: Bool

Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.

ns_ttl: Float64

The time to live (TTL) of the zone's nameserver (NS) records.

secondary_overrides: Bool

Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.

zone_mode: String

Whether the zone mode is a regular or CDN/DNS only zone.

internal_dns: Attributes

Settings for this internal zone.

reference_zone_id: String

The ID of the zone to fallback to.

nameservers: Attributes

Settings determining the nameservers through which the zone should be available.

type: String

Nameserver type

ns_set: Int64

Configured nameserver set to be used for this zone

soa: Attributes

Components of the zone's SOA record.

expire: Float64

Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.

min_ttl: Float64

The time to live (TTL) for negative caching of records within the zone.

mname: String

The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.

refresh: Float64

Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.

retry: Float64

Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.

rname: String

The email address of the zone administrator, with the first label representing the local part of the email address.

ttl: Float64

The time to live (TTL) of the SOA record itself.

cloudflare_zone_dns_settings

data "cloudflare_zone_dns_settings" "example_zone_dns_settings" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

SettingsAccount

resource cloudflare_account_dns_settings

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
zone_defaults?: Attributes
flatten_all_cnames?: Bool

Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.

foundation_dns?: Bool

Whether to enable Foundation DNS Advanced Nameservers on the zone.

internal_dns?: Attributes

Settings for this internal zone.

reference_zone_id?: String

The ID of the zone to fallback to.

multi_provider?: Bool

Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.

nameservers?: Attributes

Settings determining the nameservers through which the zone should be available.

type?: String

Nameserver type

ns_ttl?: Float64

The time to live (TTL) of the zone's nameserver (NS) records.

secondary_overrides?: Bool

Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.

soa?: Attributes

Components of the zone's SOA record.

expire?: Float64

Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.

min_ttl?: Float64

The time to live (TTL) for negative caching of records within the zone.

mname?: String

The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.

refresh?: Float64

Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.

retry?: Float64

Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.

rname?: String

The email address of the zone administrator, with the first label representing the local part of the email address.

ttl?: Float64

The time to live (TTL) of the SOA record itself.

zone_mode?: String

Whether the zone mode is a regular or CDN/DNS only zone.

cloudflare_account_dns_settings

resource "cloudflare_account_dns_settings" "example_account_dns_settings" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  zone_defaults = {
    flatten_all_cnames = false
    foundation_dns = false
    internal_dns = {
      reference_zone_id = "reference_zone_id"
    }
    multi_provider = false
    nameservers = {
      type = "cloudflare.standard"
    }
    ns_ttl = 86400
    secondary_overrides = false
    soa = {
      expire = 604800
      min_ttl = 1800
      mname = "kristina.ns.cloudflare.com"
      refresh = 10000
      retry = 2400
      rname = "admin.example.com"
      ttl = 3600
    }
    zone_mode = "dns_only"
  }
}

data cloudflare_account_dns_settings

required Expand Collapse
account_id: String

Identifier.

computed Expand Collapse
zone_defaults: Attributes
flatten_all_cnames: Bool

Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.

foundation_dns: Bool

Whether to enable Foundation DNS Advanced Nameservers on the zone.

internal_dns: Attributes

Settings for this internal zone.

reference_zone_id: String

The ID of the zone to fallback to.

multi_provider: Bool

Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.

nameservers: Attributes

Settings determining the nameservers through which the zone should be available.

type: String

Nameserver type

ns_ttl: Float64

The time to live (TTL) of the zone's nameserver (NS) records.

secondary_overrides: Bool

Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.

soa: Attributes

Components of the zone's SOA record.

expire: Float64

Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.

min_ttl: Float64

The time to live (TTL) for negative caching of records within the zone.

mname: String

The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.

refresh: Float64

Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.

retry: Float64

Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.

rname: String

The email address of the zone administrator, with the first label representing the local part of the email address.

ttl: Float64

The time to live (TTL) of the SOA record itself.

zone_mode: String

Whether the zone mode is a regular or CDN/DNS only zone.

cloudflare_account_dns_settings

data "cloudflare_account_dns_settings" "example_account_dns_settings" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

SettingsAccountViews

resource cloudflare_account_dns_settings_internal_view

required Expand Collapse
account_id: String

Identifier.

name: String

The name of the view.

zones: Set[String]

The list of zones linked to this view.

computed Expand Collapse
id: String

Identifier.

created_time: Time

When the view was created.

modified_time: Time

When the view was last modified.

cloudflare_account_dns_settings_internal_view

resource "cloudflare_account_dns_settings_internal_view" "example_account_dns_settings_internal_view" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  name = "my view"
  zones = ["372e67954025e0ba6aaa6d586b9e0b59"]
}

data cloudflare_account_dns_settings_internal_view

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
view_id?: String

Identifier.

filter?: Attributes
direction?: String

Direction to order DNS views in.

match?: String

Whether to match all search requirements or at least one (any). If set to all, acts like a logical AND between filters. If set to any, acts like a logical OR instead.

name?: Attributes
contains?: String

Substring of the DNS view name.

endswith?: String

Suffix of the DNS view name.

exact?: String

Exact value of the DNS view name.

startswith?: String

Prefix of the DNS view name.

order?: String

Field to order DNS views by.

zone_id?: String

A zone ID that exists in the zones list for the view.

zone_name?: String

A zone name that exists in the zones list for the view.

computed Expand Collapse
id: String

Identifier.

created_time: Time

When the view was created.

modified_time: Time

When the view was last modified.

name: String

The name of the view.

zones: Set[String]

The list of zones linked to this view.

cloudflare_account_dns_settings_internal_view

data "cloudflare_account_dns_settings_internal_view" "example_account_dns_settings_internal_view" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  view_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_account_dns_settings_internal_views

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
order?: String

Field to order DNS views by.

zone_id?: String

A zone ID that exists in the zones list for the view.

zone_name?: String

A zone name that exists in the zones list for the view.

name?: Attributes
contains?: String

Substring of the DNS view name.

endswith?: String

Suffix of the DNS view name.

exact?: String

Exact value of the DNS view name.

startswith?: String

Prefix of the DNS view name.

direction?: String

Direction to order DNS views in.

match?: String

Whether to match all search requirements or at least one (any). If set to all, acts like a logical AND between filters. If set to any, acts like a logical OR instead.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Identifier.

created_time: Time

When the view was created.

modified_time: Time

When the view was last modified.

name: String

The name of the view.

zones: Set[String]

The list of zones linked to this view.

cloudflare_account_dns_settings_internal_views

data "cloudflare_account_dns_settings_internal_views" "example_account_dns_settings_internal_views" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  name = {
    contains = "view"
    endswith = "ew"
    exact = "my view"
    startswith = "my"
  }
  order = "name"
  zone_id = "ae29bea30e2e427ba9cd8d78b628177b"
  zone_name = "www.example.com"
}