Use the infoblox_aaaa_record data source to retrieve the following information about an AAAA record from the corresponding object in NIOS:
Parameter | Description | Example |
---|---|---|
| The DNS view in which the record's zone exists. |
|
| The IPv6 address associated with the AAAA-record. |
|
| The fully qualified domain name which the IP address is assigned to. |
|
| The zone that contains the record in the specified DNS view. |
|
| The Time to Live value of the record, in seconds. |
|
| A description of the record. This is a regular comment. |
|
| The set of extensible attributes of the record, if any. The content is formatted as a string of JSON map. |
|
|
|
|
|
To get retrieve information about an AAAA record, specify a combination of the DNS view, the IPv6 address that the record points to, and the FQDN that corresponds to the IP address. AAAA 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 AAAA records in the NIOS Grid.
The following table describes the parameters you can define in an infoblox_aaaa_record
data source block:
Parameter |
---|
Alias* | Description | |
---|---|---|
|
| Specifies the fully qualified domain name to which the IP address is assigned. |
|
|
Optional
Specifies the DNS view in which the |
record’s zone exists. |
default
is usedmatching objects are retrieved from all DNS views in the NIOS Grid. |
|
| Specifies the IPv6 address associated with the AAAA record. |
fqdn
|
| Specifies the |
zone in which the record exists. | ||
|
| Describes the AAAA record. |
Extensible Attributes | - | Specifies the extensible attributes specified for the record. You must specify the key/value pair within the |
*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 AAAA Record Data Source Block
The following example of an infoblox_aaaa_record
data source block defines a data source of type infoblox_aaaa_record
and name vipqa_rec_hosttemp
, which is configured in a Terraform file. You can reference the resource and retrieve information about it. For example, data.infoblox_aaaa_record.vip_host.comment
returns the text in the comment
field of the AAAA record.data
resource "infoblox_aaaa_record" "vip_host" {
dns_view="default"
fqdn = "very-interesting-host.example.com"
ipv6_addr = "2a05:d014:275:cb00:ec0d:12e2:df27:aa60"
}
output "vip_host_id" {
value = data. comment = "some comment"
ttl = 120 // 120s
ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
}
data "infoblox_aaaa_record.vip_host.id
}
output "vip_host_zone" {
value = data." "qa_rec_temp" {
filters = {
name ="very-interesting-host.example.com"
ipv6addr ="2a05:d014:275:cb00:ec0d:12e2:df27:aa60"
}
// This is just to ensure that the record has been be created
// using 'infoblox_aaaa_record.vip_host.zone
}
output "vip_host_ttl" {
value = data.' resource block before the data source will be queried.
depends_on = [infoblox_aaaa_record.vip_host.ttl]
}
output "vipqa_hostrec_commentres" {
value = data.infoblox_aaaa_record.vip_host.commentqa_rec_temp
}
// accessing ip addr field in results
output "vipqa_hostrec_ext_attrsaddr" {
value = data.infoblox_aaaa_record.vip_host.ext_attrs
}
qa_rec_temp.results.0.ip_addr //zero represents index of json object from results list
}
// searching for AAAA-Record by specifying EA's
data "infoblox_aaaa_record" "aaaaqa_rec_rec2ea" {
fqdn filters = {
"*Site" = "sample test site"
"*Location" = "static2.example4.org"
ipv6_addr = "2002:1111::1402"
dns_view = "nondefault_dnsview2" // optional but differs from the default value
65.8665701230204, -37.00791763398113"
"*Location!" = "75.8665701230211"
}
}
output "qa_rec_out" {
value = data.infoblox_aaaa_record.qa_rec_ea
}