DNS
DNSDNSSEC
resource cloudflare_zone_dnssec
optional
If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone.
See Multi-signer DNSSEC for details.
If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly.
Note that this feature has some limitations. See Cloudflare as Secondary for details.
If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time.
See DNSSEC with NSEC3 for details.
computed
cloudflare_zone_dnssec
resource "cloudflare_zone_dnssec" "example_zone_dnssec" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
dnssec_multi_signer = false
dnssec_presigned = true
dnssec_use_nsec3 = false
status = "active"
}
data cloudflare_zone_dnssec
computed
If true, multi-signer DNSSEC is enabled on the zone, allowing multiple providers to serve a DNSSEC-signed zone at the same time. This is required for DNSKEY records (except those automatically generated by Cloudflare) to be added to the zone.
See Multi-signer DNSSEC for details.
If true, allows Cloudflare to transfer in a DNSSEC-signed zone including signatures from an external provider, without requiring Cloudflare to sign any records on the fly.
Note that this feature has some limitations. See Cloudflare as Secondary for details.
If true, enables the use of NSEC3 together with DNSSEC on the zone. Combined with setting dnssec_presigned to true, this enables the use of NSEC3 records when transferring in from an external provider. If dnssec_presigned is instead set to false (default), NSEC3 records will be generated and signed at request time.
See DNSSEC with NSEC3 for details.
cloudflare_zone_dnssec
data "cloudflare_zone_dnssec" "example_zone_dnssec" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
DNSRecords
resource cloudflare_dns_record
required
optional
Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.
computed
cloudflare_dns_record
resource "cloudflare_dns_record" "example_dns_record" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
name = "example.com"
ttl = 3600
type = "A"
comment = "Domain verification record"
content = "198.51.100.4"
private_routing = true
proxied = true
settings = {
ipv4_only = true
ipv6_only = true
}
tags = ["owner:dns-team"]
}
data cloudflare_dns_record
computed
Required for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.
cloudflare_dns_record
data "cloudflare_dns_record" "example_dns_record" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
dns_record_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
data cloudflare_dns_records
optional
Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the match setting. For automated searches, please use the other available parameters.
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. Note that the interaction between tag filters is controlled by the tag-match parameter instead.
Whether to match all tag search requirements or at least one (any). If set to all, acts like a logical AND between tag filters. If set to any, acts like a logical OR instead. Note that the regular match parameter is still used to combine the resulting condition with other filters that aren't related to tags.
cloudflare_dns_records
data "cloudflare_dns_records" "example_dns_records" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
comment = {
absent = "absent"
contains = "ello, worl"
endswith = "o, world"
exact = "Hello, world"
present = "present"
startswith = "Hello, w"
}
content = {
contains = "7.0.0."
endswith = ".0.1"
exact = "127.0.0.1"
startswith = "127.0."
}
name = {
contains = "w.example."
endswith = ".example.com"
exact = "www.example.com"
startswith = "www.example"
}
search = "www.cloudflare.com"
tag = {
absent = "important"
contains = "greeting:ello, worl"
endswith = "greeting:o, world"
exact = "greeting:Hello, world"
present = "important"
startswith = "greeting:Hello, w"
}
type = "A"
}
DNSSettingsZone
resource cloudflare_zone_dns_settings
optional
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.
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.
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
computed
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.
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.
cloudflare_zone_dns_settings
data "cloudflare_zone_dns_settings" "example_zone_dns_settings" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
DNSSettingsAccount
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"
}
}
DNSSettingsAccountViews
resource cloudflare_account_dns_settings_internal_view
required
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
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
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"
}
DNSZone TransfersIncoming
resource cloudflare_dns_zone_transfers_incoming
optional
cloudflare_dns_zone_transfers_incoming
resource "cloudflare_dns_zone_transfers_incoming" "example_dns_zone_transfers_incoming" {
zone_id = "269d8f4853475ca241c4e730be286b20"
auto_refresh_seconds = 86400
name = "www.example.com."
peers = ["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"]
}
data cloudflare_dns_zone_transfers_incoming
cloudflare_dns_zone_transfers_incoming
data "cloudflare_dns_zone_transfers_incoming" "example_dns_zone_transfers_incoming" {
zone_id = "269d8f4853475ca241c4e730be286b20"
}
DNSZone TransfersOutgoing
resource cloudflare_dns_zone_transfers_outgoing
cloudflare_dns_zone_transfers_outgoing
resource "cloudflare_dns_zone_transfers_outgoing" "example_dns_zone_transfers_outgoing" {
zone_id = "269d8f4853475ca241c4e730be286b20"
name = "www.example.com."
peers = ["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"]
}
data cloudflare_dns_zone_transfers_outgoing
computed
cloudflare_dns_zone_transfers_outgoing
data "cloudflare_dns_zone_transfers_outgoing" "example_dns_zone_transfers_outgoing" {
zone_id = "269d8f4853475ca241c4e730be286b20"
}
DNSZone TransfersACLs
resource cloudflare_dns_zone_transfers_acl
required
Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.
cloudflare_dns_zone_transfers_acl
resource "cloudflare_dns_zone_transfers_acl" "example_dns_zone_transfers_acl" {
account_id = "01a7362d577a6c3019a474fd6f485823"
ip_range = "192.0.2.53/28"
name = "my-acl-1"
}
data cloudflare_dns_zone_transfers_acl
computed
Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.
cloudflare_dns_zone_transfers_acl
data "cloudflare_dns_zone_transfers_acl" "example_dns_zone_transfers_acl" {
account_id = "01a7362d577a6c3019a474fd6f485823"
acl_id = "23ff594956f20c2a721606e94745a8aa"
}
DNSZone TransfersPeers
resource cloudflare_dns_zone_transfers_peer
optional
IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.
Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.
cloudflare_dns_zone_transfers_peer
resource "cloudflare_dns_zone_transfers_peer" "example_dns_zone_transfers_peer" {
account_id = "01a7362d577a6c3019a474fd6f485823"
name = "my-peer-1"
}
data cloudflare_dns_zone_transfers_peer
computed
IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.
Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.
cloudflare_dns_zone_transfers_peer
data "cloudflare_dns_zone_transfers_peer" "example_dns_zone_transfers_peer" {
account_id = "01a7362d577a6c3019a474fd6f485823"
peer_id = "23ff594956f20c2a721606e94745a8aa"
}
data cloudflare_dns_zone_transfers_peers
cloudflare_dns_zone_transfers_peers
data "cloudflare_dns_zone_transfers_peers" "example_dns_zone_transfers_peers" {
account_id = "01a7362d577a6c3019a474fd6f485823"
}
DNSZone TransfersTSIGs
resource cloudflare_dns_zone_transfers_tsig
required
cloudflare_dns_zone_transfers_tsig
resource "cloudflare_dns_zone_transfers_tsig" "example_dns_zone_transfers_tsig" {
account_id = "01a7362d577a6c3019a474fd6f485823"
algo = "hmac-sha512."
name = "tsig.customer.cf."
secret = "caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c"
}
data cloudflare_dns_zone_transfers_tsig
cloudflare_dns_zone_transfers_tsig
data "cloudflare_dns_zone_transfers_tsig" "example_dns_zone_transfers_tsig" {
account_id = "01a7362d577a6c3019a474fd6f485823"
tsig_id = "69cd1e104af3e6ed3cb344f263fd0d5a"
}
data cloudflare_dns_zone_transfers_tsigs
cloudflare_dns_zone_transfers_tsigs
data "cloudflare_dns_zone_transfers_tsigs" "example_dns_zone_transfers_tsigs" {
account_id = "01a7362d577a6c3019a474fd6f485823"
}