Use the data resource for the CNAME object to retrieve the following information for CNAME records:
Parameter | Description | Example |
---|---|---|
| The zone that contains the record in the specified DNS view. | test.com |
| The Time to Live value of the record, in seconds. | 3600 |
| A text describing the record. This is a regular comment. | Temporary A record |
| The set of extensible attributes of the record, if any. The content is formatted as a JSON map. | {"Owner |
To get information about a CNAME record, you must specify a combination of the DNS view, canonical name, and an alias that the record points to.
The following table describes the parameters you can define in an infoblox_cname_record
data source block:
Parameter | Required/Optional | Description |
---|---|---|
| Required | Specifies the DNS view in which the record exists. |
| Required | Specifies the canonical name of the record in the FQDN format. |
| Required | Specifies the alias name of the record in the FQDN format. |
Example of the CNAME Record Data Source Block
data "infoblox_cname_record" "foo"{
dns_view="default"
alias="foo.test.com"
canonical="main.test.com"
}
output "foo_ttl" {
value = data.infoblox_cname_record.foo.ttl
}
output "
foo_
zone" { value = data.infoblox_cname_record.foo.zone
}
output "
foo_
comment" { value = data.infoblox_cname_record.foo.comment
}
output "
foo_
ext_attrs" { value = data.infoblox_cname_record.foo.ext_attrs
}
data "infoblox_cname_record" "cname_rec1" {
dns_view = "default" // required parameter here
canonical = "canonical.test.net"
alias = "hq-server.example1.org"
}