infoblox_zone_auth Data Source
Use the infoblox_zone_auth
data source to retrieve the following information about an authoritative DNS zone from the corresponding object in NIOS:
Parameter | Description | Example |
---|---|---|
| The name of the DNS zone. For a reverse zone, this is in CIDR format. |
For reverse mapping zone: |
| The name of the DNS view in which the zone resides. |
|
| Determines the format of the zone. Valid values are |
|
| The name server group that serves DNS for this zone. |
|
| A description of the DNS zone. This is a regular comment. |
|
| The set of extensible attributes of the DNS view, if any. |
|
To retrieve information about authoritative zones 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 authoritative zones in the NIOS Grid.
The following table describes the parameters you can define in the infoblox_zone_auth
data source block:
Parameter | Description |
---|---|
| Specifies the name of the DNS view in which the DNS zone exists. |
| Specifies the name of the DNS zone. |
| Specifies the format of the DNS zone. |
| The description of the DNS zone. |
Extensible Attributes | Specifies the extensible attributes specified for the DNS zone. You must specify the key/value pair within the |
Example of the Zone Auth Data Source Block
resource "infoblox_zone_auth" "zone1"{
fqdn = "17.1.0.0/16"
zone_format = "IPV4"
view = "default"
comment = "test sample reverse zone"
ext_attrs = jsonencode({
Location = "Test Zone Location"
})
}
data "infoblox_zone_auth" "dzone1" {
filters = {
view = "default"
fqdn = "test3.com"
zone_format = "FORWARD"
}
// This is just to ensure that the zone has been be created
// using 'infoblox_zone_auth' resource block before the data source will be queried.
depends_on = [infoblox_zone_auth.zone1]
}
output "zauth_res" {
value = data.infoblox_zone_auth.dzone1
}
// accessing individual field in results
output "zauth_name" {
value = data.infoblox_zone_auth.dzone1.results.0.fqdn //zero represents index of json object from results list
}
// accessing Zone Auth by specifying EAs
data "infoblox_zone_auth" "zauth_ea" {
filters = {
"*Location" = "California"
"*Location!" = "Florida"
}
}
// returns matching Zones with EA, if any
output "zauth_out" {
value = data.infoblox_zone_auth.zauth_ea
}