Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

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

Parameter

Description

Example

text

The textual value for the TXT record. You must specify a value for this parameter.

test.com

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 JSON map.

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

To get 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 number.

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

Parameter

Required/Optional

Description

fqdn

Required

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

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.

Example of the TXT Record Data Source Block

The following example defines a data source of type infoblox_txt_record and the name "ds3", which is configured in a Terraform file. You can reference this data source and retrieve information about it.

resource "infoblox_txt_record" "rec3" {
dns_view = "nondefault_dnsview1"
fqdn = "example3.example2.org"
text = "data for TXT-record #3"
ttl = 300
comment = "example TXT record #3"
ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
}


data "infoblox_txt_record" "ds3" {
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_rec3_text" {
value = data.infoblox_txt_record.ds3.text
}
output "txt_rec3_zone" {
value = data.infoblox_txt_record.ds3.zone
}
output "txt_rec3_ttl" {
value = data.infoblox_txt_record.ds3.ttl
}
output "txt_rec3_comment" {
value = data.infoblox_txt_record.ds3.comment
}
output "txt_rec3_ext_attrs" {
value = data.infoblox_txt_record.ds3.ext_attrs
}

  • No labels