...
Parameter | Description | Example |
---|---|---|
| The zone in which the record exists. |
|
| 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 JSON map. |
|
To get information about a PTR record, specify a combination of the DNS view, the IPv4 address that IP address associated with the record points to or the record’s name in the FQDN format , and the FQDN that corresponds to the IP addressthe record points to.
The following table describes the parameters you can define in an infoblox_ptr_record
data source block:
Parameter | Required/Optional | Description |
---|---|---|
| OptionalRequired | Specifies the DNS view in which the record in a reverse mapping zone exists. If a value is not specified, the name |
| Required only if | Specifies the IPv4 or IPv6 address associated with the PTR record. If both |
| Required only if | Specifies the name of the PTR record, in the FQDN format, that can be used instead of an IP address. Example: 1.0.0.10.in-addr.arpa. |
| RequiredOptional | Specifies the fully qualified domain name the PTR record points tothe DNS view in which the record’s zone exists. |
Example of the PTR Record Data Source Block
The following example of an infoblox_ptr_record
data source block defines a data source of type infoblox_ptr_record
and name host1
, which is configured in a Terraform configuration file. You can reference this resource and retrieve information about it. For example, data.infoblox_ptr_record.host1.comment
returns the text in the comment
field of the PTR record.
resource "infoblox_ptr_record" "host1" {
ptrdname = "host.example.org"
ip_addr = "2a05:d014:275:cb00:ec0d:12e2:df27:aa60"
comment = "workstation #3"
ttl = 300 # 5 minutes
ext_attrs = jsonencode({
"Location" = "the main office"
})
}
data "infoblox_ptr_record" "host1" {
dns_view="default"
ptrdname="host.example.org"
ip_addr="2a05:d014:275:cb00:ec0d:12e2:df27:aa60"
// This is just to ensure that the record has been be created
// using 'infoblox_ptr_record' resource block before the data source will be queried.
depends_on = [infoblox_ptr_record.host1]
}
output "host1_id" {
value = data.infoblox_ptr_record.host1.id
}
output "host1_ip_addr" {
value = data.infoblox_ptr_record.host1.ip_addr
}
...