Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use the data source to retrieve the following information for a TXT record, which is managed by a NIOS server:

Parameter

Description

Example

dns_view

The DNS view in which the record's zone exists.

test.com

fqdn

The fully qualified domain name to which a textual value is assigned.

sampletxt.demo.com

text

The textual value for the TXT record

. You must specify a value for this parameter

.

test.com

some random nex

zone

The zone that contains the record.

test.com

ttl

The Time to Live value of the record, in seconds.

3600

comment

A description of the record. This is a regular comment.

spare node for the service

ext_attrs

The set of extensible attributes of the record, if any. The content is formatted as a string of JSON map.

{\"Owner\":\"State Library\", \"Expires\":\"never\"}

To get retrieve information about a TXT record, specify the FQDN of the domain to which the text record is assigned, the FQDN of the mail exchange host, and the preference numberTXT records that match the specified filters, use the filters argument and specify the parameters mentioned in the below table. These are the searchable parameters of the corresponding object in Infoblox NIOS WAPI. If you do not specify any parameter, the data source retrieves information about all TXT records in the NIOS Grid.

The following table describes the parameters you can define in an infoblox_txt_record data source block:

Parameter

Required/Optional

Alias*

Description

name

fqdn

Required

Specifies the fully qualified domain name to which the textual value is assigned.

text

text

Specifies the textual value for the TXT record.

view

dns_view

Optional

Specifies the DNS view in which the record’s zone exists.
If a value is not specified,

default will be used as the DNS view name.
If the zone is in a non-default DNS view, then you must specify that view

matching objects are retrieved from all DNS views in the NIOS Grid.

zone

zone

Specifies the zone that contains the record.

comment

comment

Describes the record.

Extensible Attributes

-

Specifies the extensible attributes specified for the record. You must specify the key/value pair within the filters argument.
Example:
filters = {
"*Site" = "some test site"
}

*Aliases are the parameter names used in the prior releases of Infoblox IPAM Plug-In for Terraform. Do not use the alias names for parameters in the data source blocks. Using them can result in error scenarios.

Example of the TXT Record Data Source Block

...


data "infoblox_txt_record" "ds3" {
filters = {
dns_view = "nondefault_dnsview1"
fqdn = "example3.example2.org"
}

// This is just to ensure that the record has been be created
// using 'infoblox_txt_record' resource block before the data source will be queried.
depends_on = [infoblox_txt_record.rec3]
}

output "txt_rec3rec_textres" {
value = data.infoblox_txt_record.ds3.text
}

// accessing individual field in results
output "txt_rec3rec_zonemes" {
value = data.infoblox_txt_record.ds3.zone
}
output "txt_rec3_ttl" {
value = data.results.0.text //zero represents index of json object from results list
}

// Searching for TXT-Record by specifying EAs
data "infoblox_txt_record.ds3.ttl
}
output " "txt_rec3rec_commentea" {
value = data.infoblox_txt_record.ds3.comment
}
filters = {
"*Location" = "65.8665701230204, -37.00791763398113"
"*Location!" = "75.8665701230211"
}
}

// throws matching TXT-Records with EA, if any
output "txt_rec3rec_ext_attrsout" {
value = data.infoblox_txtinfoblox_record.ds3.ext_attrstxt_rec_ea
}