---
title: "infoblox_ns_record Data Resource"
canonical: "https://docs.infoblox.com/space/ipamdriverterraform/1383235858/infoblox_ns_record%20Data%20Resource"
format: markdown
---
Use the data source to retrieve the following information for an NS record, which is managed by a NIOS server:

| **Parameter** | **Description** | **Example** |
| --- | --- | --- |
| `name` | The record's name in FQDN format. | `test.com` |
| `nameserver` | The domain name of an authoritative server for the redirected zone. | `dns.provider.com` |
| `addresses` | The list of name servers in the zone. | `[{`  
`    address = "10.3.2.5"`  
`    auto_create_ptr=true`  
`}]` |
| `dns_view` | The DNS view in which the record exists. | `default` |
| `zone` | The zone that contains the record. | `test.com` |
| `creator` | The creator of the NS record. The valid values are `STATIC` and `SYSTEM`. | `STATIC` |
| `dns_name` | The name for an ALIAS record in puny code format. | `test.com` |
| `policy` | The host name policy for the record. | `Allow Underscore` |
| `ms_delegation_name` | The name of the MS delegation point. | `delegation.com` |
| `cloud_info` | The structure that contains all cloud API related information for this object. | `"{\"authority_type\":\"GM\",\"delegated_scope\":\"NONE\",\"owned_by_adaptor\":false}"` |

To retrieve information about NS 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 NS records in the NIOS Grid.

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

| **Parameter** | **Alias*** | **Description** |
| --- | --- | --- |
| `name` | `name` | Specifies the record's name. |
| `nameserver` | `nameserver` | Specifies the domain name of an authoritative server for the redirected zone. |
| `view` | `dns_view` | Specifies the DNS view in which the record’s zone exists.  
If a value is not specified, matching objects are retrieved from all DNS views in the NIOS Grid. |
| `zone` | `zone` | Specifies the zone that contains the record. |
| `creator` | `creator` | Specifies the creator of the NS record. The valid values are`STATIC` and `SYSTEM`. |

*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 NS Record Data Source Block

`resource "infoblox_ns_record" "ns"{`  
`  name = "test.com"`  
`  nameserver = "name.test.com"`  
`  addresses{`  
`    address = "10.3.2.5"`  
`    auto_create_ptr=true`  
`  }`  
`  dns_view = "default"`  
`}`

`data "infoblox_ns_record" "testNs_read" {`  
`  filters = {`  
`    name = infoblox_ns_record.ns.name`  
`    view = infoblox_ns_record.ns.dns_view`  
`    nameserver=infoblox_ns_record.ns.nameserver`  
`  }`  
`}`

`output "dtc_rec_res1" {`  
`  value = data.infoblox_ns_record.testNs_read`  
`}`