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

| **Parameter** | **Description** | **Example** |
| --- | --- | --- |
| `name` | The name of the alias record. | `alias.test.com` |
| `disable` | The flag that indicates whether the record is disabled. | `false` |
| `target_name` | The target name in FQDN format. | `aa.test.com` |
| `target_type` | The type of the target object. | `NAPTR` |
| `dns_view` | The DNS view in which the record exists. | `default` |
| `dns_name` | The name for an ALIAS record in puny code format. | `alias.test.com` |
| `dns_target_name` | The DNS target name of the ALIAS record in puny code format. | `aa.test.com` |
| `creator` | The creator of the ALIAS record. The valid value is `STATIC` | `STATIC` |
| `zone` | The zone that contains the record. | `test.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}"` |
| `ttl` | The Time to Live value of the record, in seconds. | `3600` |
| `comment` | A description of the record. This is a regular comment. | `created by Terraform` |
| `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 retrieve information about ALIAS 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 ALIAS records in the NIOS Grid.

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

| **Parameter** | **Alias*** | **Description** |
| --- | --- | --- |
| `name` | `name` | Specifies the record's name. |
| `target_name` | `target_name` | Specifies the target name in FQDN format. |
| `target_type` | `target_type` | Specifies the type of the target record. |
| `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. |
| `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 ALIAS Record Data Source Block

`// creating an alias record resource`  
`resource "infoblox_alias_record" "alias_record" {`  
`  name = "alias-record.test.com"`  
`  target_name = "hh.ll.com"`  
`  target_type = "NAPTR"`  
`  comment = "example alias record"`  
`  dns_view = "default"`  
`  disable = true`  
`  ttl = 1200`  
`  ext_attrs = jsonencode({`  
`    "Site" = "Ireland"`  
`  })`  
`}`  


`// accessing alias record by specifying name and comment`  
`data "infoblox_alias_record" "alias_read" {`  
`  filters = {`  
`    name = infoblox_alias_record.alias_record.name`  
`    comment = infoblox_alias_record.alias_record.comment`  
`  }`  
`}`  


`// returns matching alias record with name and comment, if any`  
`output "alias_record_res" {`  
`  value = data.infoblox_alias_record.alias_read`  
`}`  


`// accessing alias record by specifying dns_view, zone, target_name and target_type`  
`data "infoblox_alias_record" "alias_read1" {`  
`  filters = {`  
`    view = "default"`  
`    zone = "test.com"`  
`    target_name = "hh.ll.com"`  
`    target_type = "NAPTR"`  
`  }`  
`}`  


`// returns matching alias record with dns_view, zone, target_name and target_type, if any`  
`output "alias_record_res1" {`  
`  value = data.infoblox_alias_record.alias_read1`  
`}`