/
Fetching Data for a Network Object

Fetching Data for a Network Object

You can fetch information such as network ID (_ref) and name for a network from NIOS to Terraform using the infoblox_network data source block.

 The following table describes the parameters that are used to fetch the data:

Sr No.

Parameter

Mandatory/Optional

Description

1network_view_nameOptional

Specifies the network view name. If a network view is not specified, the provider considers the default network view.

2network_nameComputed

Specifies the network name that is fetched from the data source.

3cidrMandatorySpecifies the network block in cidr format.
4tenant_idMandatory

Specifies the unique identifier of the tenant in the cloud in which the network exists.

Example

As a prerequisite, you must have a network before you can fetch the data. If a network does not exist, use the infoblox_network resource block to create a network as explained in Creating a Resource Network in a NIOS Appliance.

Use the data block to fetch the data:

data "infoblox_network" "test"

{
cidr = infoblox_network.test.cidr #add a CIDR for which data needs to be fetched
tenant_id = "default"
}


Related content