/
infoblox_dtc_server Data Source

infoblox_dtc_server Data Source

Use the infoblox_dtc_server data source to retrieve the following information about a DTC server data source from the corresponding object in NIOS:

Parameter

Description

Example

Parameter

Description

Example

name

The name of the DTC server.

terraform_server.com

host

The address or the FQDN of the DTC server.

"10.1.4.5"

disable

Indicates whether the DTC server object is enabled or disabled.

false

monitors

The list of IP addresses or FQDN and monitor pairs used for additional monitoring.

{
    host = "10.1.4.5"
    monitor_name = "sip"
    monitor_type = "sip"
  }

auto_create_host_record

A flag that indicates whether a single read-only A, AAAA, or a CNAME record corresponding to the configured host name was automatically created or updated when the resource block was run.

true

use_sni_hostname

A flag that indicates whether a host name for Server Name Indication (SNI) was used.

true

sni_hostname

The hostname for Server Name Indication (SNI) in FQDN format.

sni.host.com

health

Information related to the health of the DTC LBDN object. The health parameters it displays are:

  • availability: The availability status displayed in one of the following colors:

    • BLUE

    • GREEN

    • GRAY

    • NONE

    • RED

    • YELLOW

  • description: A description about the status.

  • enabled state: The enabled state of the LBDN. It can return one of the following values:

    • DISABLED

    • DISABLED_BY_PARENT

    • ENABLED

    • NONE

{
availability = "NONE"
description = ""
enabled_state = "DISABLED"
}

comment

A description of the DTC server. This is a regular comment.

The DTC server object in NIOS.

ext_attrs

The set of extensible attributes of the DTC server view, if any. The content is formatted as a string of JSON map.

{\"Owner\":\"State Library\", \"Expires\":\"never\"}

To retrieve information about DTC servers 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 DTC servers in the NIOS Grid.

The following table describes the parameters you can define in the infoblox_dtc_server data source block:

Parameter

Description

Parameter

Description

name

Specifies the desired name of the DTC server as shown in the NIOS appliance. The name has the same requirements as the corresponding parameter in WAPI.

host

Specifies the address or the FQDN of the DTC server.

sni_hostname

Specifies the hostname for Server Name Indication (SNI) in FQDN format. You must set use_sni_hostname to true to configure this parameter.

comment

Describes the DTC server.

Extensible Attributes

Specifies the extensible attributes specified for the DTC server. You must specify the key/value pair within the filters argument.
Example:
filters = {
"*Site" = "some test site"
}

Example of a DTC Server Data Source Block

resource "infoblox_dtc_server" "server12"{
   name = "terraform_server.com"
host = "10.1.4.5"
comment = "testing server terraform"
sni_hostname = "sni.host.com"
use_sni_hostname = true
monitors {
   host = "10.1.4.5"
  monitor_name = "sip"
    monitor_type = "sip"
  }
   monitors {
   host = "10.1.4.32"
     monitor_name = "http"
     monitor_type = "http"
   }
  ext_attrs = jsonencode({
     "Site" = "Blr"
 })
  auto_create_host_record= true
   disable = true
}
data "infoblox_dtc_server" "exampleServer_read" {  
   filters = {
     name = infoblox_dtc_server.server12.name
  }
   depends_on=[infoblox_dtc_server.server12]
 }
output "server_res" {
   value = data.infoblox_dtc_server.exampleServer_read
}