---
title: "infoblox_txt_record Resource"
canonical: "https://docs.infoblox.com/space/ipamdriverterraform/216170689/infoblox_txt_record%20Resource"
format: markdown
---
The `infoblox_txt_record` resource corresponds to a TXT record (text record) in NIOS. A TXT record contains supplementary information that it associates with a host. For more information about a TXT record, refer to *Managing TXT Records* in the *[Infoblox NIOS Documentation](https://docs.infoblox.com/)*.

The following table describes the parameters you can define in the resource block of the record:

| **Parameter** | **Required/**  
**Optional** | **Description** | **Example Value** |
| --- | --- | --- | --- |
| `fqdn` | Required | Specifies the fully qualified domain name of the host to which you want to assign the text value. | `host43.zone12.org` |
| `text` | Required | Specifies the text value that you want to associate with the TXT record.  
It can contain substrings of up to 255 bytes and a total of up to 512 bytes.  
If you enter leading, trailing, or embedded spaces in the text string, enclose the entire string within `\"` characters to preserve the spaces. | `"\" v=spf1 include:corp200.com -all \""` |
| `dns_view` | Optional | Specifies the DNS view in which the zone exists. If a value is not specified, `default` will be used as the DNS view name. | `dns_view_1` |
| `ttl` | Optional | Specifies the Time to Live value for the record. There is no default value for this parameter.  
If a value is not specified, then in NIOS, the TTL value is inherited from the parent zone of the DNS record for this resource. A TTL value of 0 (zero) means caching should be disabled for this record. | `600` |
| `comment` | Optional | Describes the record. | `auto-created test record #1` |
| `ext_attrs` | Optional | Specifies the set of NIOS extensible attributes that are attached to the record. | `jsonencode({})` |

## Examples of the TXT Record Block

`// TXT-Record, minimal set of parameters`  
`resource "infoblox_txt_record" "rec1" {`  
`  fqdn = "sample1.example.org"`  
`  text = "\"this is just a sample\""`  
`}`  


`// some parameters for a TXT-Record`  
`resource "infoblox_txt_record" "rec2" {`  
`  dns_view = "default" // may be omitted`  
`  fqdn = "sample2.example.org"`  
`  text = "\"data for TXT-record #2\""`  
`  ttl = 120 // 120s`  
`}`  


`// all the parameters for a TXT-Record`  
`resource "infoblox_txt_record" "rec3" {`  
`  dns_view = "nondefault_dnsview1"`  
`  fqdn = "example2.org "`  
`  text = "\"data for TXT-record #3\""`  
`  ttl = 300`  
`  comment = "example TXT record #3"`  
`  ext_attrs = jsonencode({`  
`    "Location" = "65.8665701230204, -37.00791763398113"`  
`  })`  
`}`