Skip to content

xcsh_dns_zone (Data Source)

Retrieves information about DNS Zone in a given namespace. If one already exist it will give a error in F5 Distributed Cloud. This is a read-only data source.

~> Note: For more information, see the DNS Zone API documentation.

# DNSZone Data Source Example
terraform {
required_version = ">= 1.0"
required_providers {
xcsh = {
source = "f5-sales-demo/xcsh"
version = ">= 0.1.0"
}
}
}
# Look up an existing DNSZone by name
data "xcsh_dns_zone" "example" {
name = "example-dns-zone"
namespace = "system"
}
# Fail closed when this stack depends on an externally owned zone.
resource "terraform_data" "require_managed_records" {
lifecycle {
precondition {
condition = try(
data.xcsh_dns_zone.example.primary.allow_http_lb_managed_records,
false
)
error_message = "The selected DNS zone must enable HTTP LB managed records."
}
}
}
output "dns_zone_id" {
value = data.xcsh_dns_zone.example.id
}

-> Syntax Rule: This provider uses OneOf groups for mutually exclusive options. Fields documented as “Optional Block” use block syntax field_name { ... }. Empty OneOf object attributes use field_name = {}; conditional selection uses condition ? {} : null. Boolean attributes (such as add_hsts and http_redirect) use = true or = false.

🔶 High Risk Operations — Some operations on this resource have high danger level. Destructive operations may require confirmation.

• name - Required String
Name of the DNSZone

• namespace - Optional String
Namespace where the DNSZone exists

In addition to all arguments above, the following attributes are exported:

• annotations - Optional Map
Annotations applied to this resource

• description - Optional String
Description of the DNSZone

• id - Optional String
Unique identifier for the resource

• labels - Optional Map
Labels applied to this resource

• primary - Optional String
PrimaryDNSCreateSpecType

• secondary - Optional String
SecondaryDNSCreateSpecType


A primary block supports the following:

• allow_http_lb_managed_records - Optional Bool
Option to allow user-created HTTP, TCP, and CDN load balancer related resource records to be automatically managed in a protected RRset

• default_rr_set_group - Optional List
Add and manage DNS resource record sets part of Default set group

• default_soa_parameters - Optional Object
Configuration parameter for default soa parameters

• dnssec_mode - Optional String
Disable

• rr_set_group - Optional List
Create and manage set groups, and resource record sets within them, x-VES-I/O-managed set is managed by F5

• soa_parameters - Optional String
Configuration parameter for soa parameters

A default_rr_set_group block (within primary) supports the following:

• a_record - Optional String
DNSAResourceRecord. A Records

• aaaa_record - Optional String
Configuration parameter for aaaa record

• afsdb_record - Optional String
Configuration parameter for afsdb record

• alias_record - Optional String
Configuration parameter for alias record

• caa_record - Optional String
DNSCAAResourceRecord

• cds_record - Optional String
DNS CDS Record. DNS CDS Record

• cert_record - Optional String
Configuration parameter for cert record

• cname_record - Optional String
DNSCNAMEResourceRecord

• description_spec - Optional String
Comment. Human-readable description text

• ds_record - Optional String
DNS DS Record. DNS DS Record

• eui48_record - Optional String
Configuration parameter for eui48 record

• eui64_record - Optional String
Configuration parameter for eui64 record

• lb_record - Optional String
DNS Load Balancer Record. DNS Load Balancer Record

• loc_record - Optional String
DNS LOC Record. DNS LOC Record

• mx_record - Optional String
DNSMXResourceRecord

• naptr_record - Optional String
Configuration parameter for naptr record

• ns_record - Optional String
DNSNSResourceRecord

• ptr_record - Optional String
DNSPTRResourceRecord

• srv_record - Optional String
DNSSRVResourceRecord

• sshfp_record - Optional String
Configuration parameter for sshfp record

• tlsa_record - Optional String
Configuration parameter for tlsa record

• ttl - Optional Number
Time to live. Time-to-live duration in seconds

• txt_record - Optional String
DNSTXTResourceRecord

An a_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
IPv4 Addresses. A valid IPv4 address, for example: 192.0.2.242

An aaaa_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
AAAA Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
IPv6 Addresses. A valid IPv6 address, for example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

An afsdb_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
AFSDB Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
AFSDB Value. Configuration parameter for values

Primary Default Rr Set Group Afsdb Record Values

Section titled “Primary Default Rr Set Group Afsdb Record Values”

Deeply nested Values block collapsed for readability.

An alias_record block (within primary.default_rr_set_group) supports the following:

• value - Optional String
Domain. A valid domain name, for example: example.com

A caa_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
CAA Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
CAA Record Value. Configuration parameter for values

Primary Default Rr Set Group Caa Record Values

Section titled “Primary Default Rr Set Group Caa Record Values”

Deeply nested Values block collapsed for readability.

A cds_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
CDS Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
DS Value. Configuration parameter for values

Primary Default Rr Set Group Cds Record Values

Section titled “Primary Default Rr Set Group Cds Record Values”

Deeply nested Values block collapsed for readability.

Primary Default Rr Set Group Cds Record Values Sha1 Digest

Section titled “Primary Default Rr Set Group Cds Record Values Sha1 Digest”

Deeply nested Digest block collapsed for readability.

Primary Default Rr Set Group Cds Record Values Sha256 Digest

Section titled “Primary Default Rr Set Group Cds Record Values Sha256 Digest”

Deeply nested Digest block collapsed for readability.

Primary Default Rr Set Group Cds Record Values Sha384 Digest

Section titled “Primary Default Rr Set Group Cds Record Values Sha384 Digest”

Deeply nested Digest block collapsed for readability.

A cert_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
CERT Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
CERT Value. Configuration parameter for values

Primary Default Rr Set Group Cert Record Values

Section titled “Primary Default Rr Set Group Cert Record Values”

Deeply nested Values block collapsed for readability.

A cname_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
CName Record name, please provide only the specific subdomain or record name without the base domain

• value - Optional String
Domain. Configuration parameter for value

A ds_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
DS Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
DS Value. Configuration parameter for values

Primary Default Rr Set Group Ds Record Values

Section titled “Primary Default Rr Set Group Ds Record Values”

Deeply nested Values block collapsed for readability.

Primary Default Rr Set Group Ds Record Values Sha1 Digest

Section titled “Primary Default Rr Set Group Ds Record Values Sha1 Digest”

Deeply nested Digest block collapsed for readability.

Primary Default Rr Set Group Ds Record Values Sha256 Digest

Section titled “Primary Default Rr Set Group Ds Record Values Sha256 Digest”

Deeply nested Digest block collapsed for readability.

Primary Default Rr Set Group Ds Record Values Sha384 Digest

Section titled “Primary Default Rr Set Group Ds Record Values Sha384 Digest”

Deeply nested Digest block collapsed for readability.

An eui48_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
EUI48 Record name, please provide only the specific subdomain or record name without the base domain

• value - Optional String
EUI48 Identifier. A valid eui48 identifier, for example: 01-23-45-67-89-ab

An eui64_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
EUI64 Record name, please provide only the specific subdomain or record name without the base domain

• value - Optional String
EUI64 Identifier. A valid EUI64 identifier, for example: 01-23-45-67-89-ab-cd-ef

A lb_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
Load Balancer record name (except for SRV DNS Load balancer record) should be a simple record name and not a subdomain of a subdomain

• value - Optional String
Type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name

Primary Default Rr Set Group LB Record Value

Section titled “Primary Default Rr Set Group LB Record Value”

Deeply nested Value block collapsed for readability.

A loc_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
LOC Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
LOC Value. Configuration parameter for values

Primary Default Rr Set Group Loc Record Values

Section titled “Primary Default Rr Set Group Loc Record Values”

Deeply nested Values block collapsed for readability.

A mx_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
MX Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
MX Record Value. Configuration parameter for values

Primary Default Rr Set Group Mx Record Values

Section titled “Primary Default Rr Set Group Mx Record Values”

Deeply nested Values block collapsed for readability.

A naptr_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
NAPTR Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
NAPTR Value. Configuration parameter for values

Primary Default Rr Set Group Naptr Record Values

Section titled “Primary Default Rr Set Group Naptr Record Values”

Deeply nested Values block collapsed for readability.

A ns_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
NS Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
Name Servers. Configuration parameter for values

A ptr_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
PTR Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
Domain Name. Configuration parameter for values

A srv_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
SRV Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
SRV Value. Configuration parameter for values

Primary Default Rr Set Group Srv Record Values

Section titled “Primary Default Rr Set Group Srv Record Values”

Deeply nested Values block collapsed for readability.

A sshfp_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
SSHFP Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
SSHFP Value. Configuration parameter for values

Primary Default Rr Set Group Sshfp Record Values

Section titled “Primary Default Rr Set Group Sshfp Record Values”

Deeply nested Values block collapsed for readability.

Primary Default Rr Set Group Sshfp Record Values Sha1 Fingerprint

Section titled “Primary Default Rr Set Group Sshfp Record Values Sha1 Fingerprint”

Deeply nested Fingerprint block collapsed for readability.

Primary Default Rr Set Group Sshfp Record Values Sha256 Fingerprint

Section titled “Primary Default Rr Set Group Sshfp Record Values Sha256 Fingerprint”

Deeply nested Fingerprint block collapsed for readability.

A tlsa_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
TLSA Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
TLSA Value. Configuration parameter for values

Primary Default Rr Set Group Tlsa Record Values

Section titled “Primary Default Rr Set Group Tlsa Record Values”

Deeply nested Values block collapsed for readability.

A txt_record block (within primary.default_rr_set_group) supports the following:

• name - Optional String
TXT Record name, please provide only the specific subdomain or record name without the base domain

• values - Optional List
Text. Configuration parameter for values

A default_soa_parameters block (within primary) supports the following:

A dnssec_mode block (within primary) supports the following:

• disable_spec - Optional Object
Enable this option

• enable - Optional Object
Enable. DNSSEC enable

A disable_spec block (within primary.dnssec_mode) supports the following:

An enable block (within primary.dnssec_mode) supports the following:

A rr_set_group block (within primary) supports the following:

• metadata - Optional String
MessageMetaType is metadata (common attributes) of a message that only certain messages have. This information is propagated to the metadata of a child object that gets created from the containing message during view processing. The information in this type can be specified by user during create

• rr_set - Optional List
Resource Record Sets. Collection of DNS resource record sets

A metadata block (within primary.rr_set_group) supports the following:

• description_spec - Optional String
Description. Human readable description

• name - Optional String
Name of the message. The value of name has to follow DNS-1035 format

A rr_set block (within primary.rr_set_group) supports the following:

• a_record - Optional String
DNSAResourceRecord. A Records

• aaaa_record - Optional String
Configuration parameter for aaaa record

• afsdb_record - Optional String
Configuration parameter for afsdb record

• alias_record - Optional String
Configuration parameter for alias record

• caa_record - Optional String
DNSCAAResourceRecord

• cds_record - Optional String
DNS CDS Record. DNS CDS Record

• cert_record - Optional String
Configuration parameter for cert record

• cname_record - Optional String
DNSCNAMEResourceRecord

• description_spec - Optional String
Comment. Human-readable description text

• ds_record - Optional String
DNS DS Record. DNS DS Record

• eui48_record - Optional String
Configuration parameter for eui48 record

• eui64_record - Optional String
Configuration parameter for eui64 record

• lb_record - Optional String
DNS Load Balancer Record. DNS Load Balancer Record

• loc_record - Optional String
DNS LOC Record. DNS LOC Record

• mx_record - Optional String
DNSMXResourceRecord

• naptr_record - Optional String
Configuration parameter for naptr record

• ns_record - Optional String
DNSNSResourceRecord

• ptr_record - Optional String
DNSPTRResourceRecord

• srv_record - Optional String
DNSSRVResourceRecord

• sshfp_record - Optional String
Configuration parameter for sshfp record

• tlsa_record - Optional String
Configuration parameter for tlsa record

• ttl - Optional Number
Time to live. Time-to-live duration in seconds

• txt_record - Optional String
DNSTXTResourceRecord

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Afsdb Record Values

Section titled “Primary Rr Set Group Rr Set Afsdb Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Caa Record Values

Section titled “Primary Rr Set Group Rr Set Caa Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Cds Record Values

Section titled “Primary Rr Set Group Rr Set Cds Record Values”

Deeply nested Values block collapsed for readability.

Primary Rr Set Group Rr Set Cds Record Values Sha1 Digest

Section titled “Primary Rr Set Group Rr Set Cds Record Values Sha1 Digest”

Deeply nested Digest block collapsed for readability.

Primary Rr Set Group Rr Set Cds Record Values Sha256 Digest

Section titled “Primary Rr Set Group Rr Set Cds Record Values Sha256 Digest”

Deeply nested Digest block collapsed for readability.

Primary Rr Set Group Rr Set Cds Record Values Sha384 Digest

Section titled “Primary Rr Set Group Rr Set Cds Record Values Sha384 Digest”

Deeply nested Digest block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Cert Record Values

Section titled “Primary Rr Set Group Rr Set Cert Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Ds Record Values

Section titled “Primary Rr Set Group Rr Set Ds Record Values”

Deeply nested Values block collapsed for readability.

Primary Rr Set Group Rr Set Ds Record Values Sha1 Digest

Section titled “Primary Rr Set Group Rr Set Ds Record Values Sha1 Digest”

Deeply nested Digest block collapsed for readability.

Primary Rr Set Group Rr Set Ds Record Values Sha256 Digest

Section titled “Primary Rr Set Group Rr Set Ds Record Values Sha256 Digest”

Deeply nested Digest block collapsed for readability.

Primary Rr Set Group Rr Set Ds Record Values Sha384 Digest

Section titled “Primary Rr Set Group Rr Set Ds Record Values Sha384 Digest”

Deeply nested Digest block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set LB Record Value

Section titled “Primary Rr Set Group Rr Set LB Record Value”

Deeply nested Value block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Loc Record Values

Section titled “Primary Rr Set Group Rr Set Loc Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Mx Record Values

Section titled “Primary Rr Set Group Rr Set Mx Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Naptr Record Values

Section titled “Primary Rr Set Group Rr Set Naptr Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Srv Record Values

Section titled “Primary Rr Set Group Rr Set Srv Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Sshfp Record Values

Section titled “Primary Rr Set Group Rr Set Sshfp Record Values”

Deeply nested Values block collapsed for readability.

Primary Rr Set Group Rr Set Sshfp Record Values Sha1 Fingerprint

Section titled “Primary Rr Set Group Rr Set Sshfp Record Values Sha1 Fingerprint”

Deeply nested Fingerprint block collapsed for readability.

Primary Rr Set Group Rr Set Sshfp Record Values Sha256 Fingerprint

Section titled “Primary Rr Set Group Rr Set Sshfp Record Values Sha256 Fingerprint”

Deeply nested Fingerprint block collapsed for readability.

Deeply nested Record block collapsed for readability.

Primary Rr Set Group Rr Set Tlsa Record Values

Section titled “Primary Rr Set Group Rr Set Tlsa Record Values”

Deeply nested Values block collapsed for readability.

Deeply nested Record block collapsed for readability.

A soa_parameters block (within primary) supports the following:

• expire - Optional Number
Expire value indicates when secondary nameservers should stop answering request for this zone if primary does not respond

• negative_ttl - Optional Number
Negative TTL value indicates how long to cache non-existent resource record for this zone

• refresh - Optional Number
Refresh value indicates when secondary nameservers should query for the SOA record to detect zone changes

• retry - Optional Number
Retry value indicates when secondary nameservers should retry to request the serial number if primary does not respond

• ttl - Optional Number
TTL. SOA record time to live (in seconds)

A secondary block supports the following:

• primary_servers - Optional List
Configuration parameter for primary servers

• tsig_key_algorithm - Optional String Defaults to UNDEFINED
Possible values are HMAC_MD5, UNDEFINED, HMAC_SHA1, HMAC_SHA224, HMAC_SHA256, HMAC_SHA384, HMAC_SHA512
[Enum: HMAC_MD5|UNDEFINED|HMAC_SHA1|HMAC_SHA224|HMAC_SHA256|HMAC_SHA384|HMAC_SHA512] TSIG key value must be compatible with the specified algorithm - UNDEFINED: UNDEFINED - HMAC_MD5: HMAC_MD5 - HMAC_SHA1: HMAC_SHA1 - HMAC_SHA224: HMAC_SHA224 - HMAC_SHA256: HMAC_SHA256 - HMAC_SHA384: HMAC_SHA384 - HMAC_SHA512: HMAC_SHA512

• tsig_key_name - Optional String
TSIG key name as used in TSIG protocol extension

• tsig_key_value - Optional String
SecretType is used in an object to indicate a sensitive/confidential field

A tsig_key_value block (within secondary) supports the following:

• blindfold_secret_info - Optional String
BlindfoldSecretInfoType specifies information about the Secret managed by F5XC Secret Management

• clear_secret_info - Optional String
ClearSecretInfoType specifies information about the Secret that is not encrypted

Secondary Tsig Key Value Blindfold Secret Info

Section titled “Secondary Tsig Key Value Blindfold Secret Info”

A blindfold_secret_info block (within secondary.tsig_key_value) supports the following:

• decryption_provider - Optional String
Name of the Secret Management Access object that contains information about the backend Secret Management service

• location - Optional String
Location is the uri_ref. It could be in URL format for string:/// Or it could be a path if the store provider is an HTTP/HTTPS location

• store_provider - Optional String
Name of the Secret Management Access object that contains information about the store to GET encrypted bytes This field needs to be provided only if the URL scheme is not string:///

Secondary Tsig Key Value Clear Secret Info

Section titled “Secondary Tsig Key Value Clear Secret Info”

A clear_secret_info block (within secondary.tsig_key_value) supports the following:

• provider_ref - Optional String
Name of the Secret Management Access object that contains information about the store to GET encrypted bytes This field needs to be provided only if the URL scheme is not string:///

• url - Optional String
URL of the secret. Currently supported URL schemes is string:///. For string:/// scheme, Secret needs to be encoded Base64 format. When asked for this secret, caller will GET Secret bytes after Base64 decoding


The following type definitions are used throughout this resource. See the full definition here rather than repeated inline.

Object Reference {#common-object-reference}

Section titled “Object Reference {#common-object-reference}”

Object references establish a direct reference from one configuration object to another in F5 Distributed Cloud. References use the format tenant/namespace/name.

FieldTypeDescription
nameStringName of the referenced object
namespaceStringNamespace containing the referenced object
tenantStringTenant of the referenced object (system-managed)

Transformers apply transformations to input values before matching. Multiple transformers can be applied in order.

ValueDescription
LOWER_CASEConvert to lowercase
UPPER_CASEConvert to uppercase
BASE64_DECODEDecodebase64 content
NORMALIZE_PATHNormalize URL path
REMOVE_WHITESPACERemove whitespace characters
URL_DECODEDecode URL-encoded characters
TRIM_LEFTTrim leading whitespace
TRIM_RIGHTTrim trailing whitespace
TRIMTrim both leading and trailing whitespace

HTTP methods used for request matching.

ValueDescription
ANYMatch any HTTP method
GETHTTP GET request
HEADHTTP HEAD request
POSTHTTP POST request
PUTHTTP PUT request
DELETEHTTP DELETE request
CONNECTHTTP CONNECT request
OPTIONSHTTP OPTIONS request
TRACEHTTP TRACE request
PATCHHTTP PATCH request
COPYHTTP COPY request (WebDAV)

TLS Fingerprints {#common-tls-fingerprints}

Section titled “TLS Fingerprints {#common-tls-fingerprints}”

TLS fingerprint categories for malicious client detection.

ValueDescription
TLS_FINGERPRINT_NONENo fingerprint matching
ANY_MALICIOUS_FINGERPRINTMatch any known malicious fingerprint
ADWAREAdware-associated fingerprints
DRIDEXDridex malware fingerprints
GOOTKITGootkit malware fingerprints
RANSOMWARERansomware-associated fingerprints
TRICKBOTTrickbot malware fingerprints

IP Threat Categories {#common-ip-threat-categories}

Section titled “IP Threat Categories {#common-ip-threat-categories}”

IP address threat categories for security filtering.

ValueDescription
SPAM_SOURCESKnown spam sources
WINDOWS_EXPLOITSWindows exploit sources
WEB_ATTACKSWeb attack sources
BOTNETSKnown botnet IPs
SCANNERSNetwork scanner IPs
REPUTATIONPoor reputation IPs
PHISHINGPhishing-related IPs
PROXYAnonymous proxy IPs
MOBILE_THREATSMobile threat sources
TOR_PROXYTor exit nodes
DENIAL_OF_SERVICEDoS attack sources
NETWORKKnown bad network ranges