---
title: "Fetching Data for a Network Object"
canonical: "https://docs.infoblox.com/space/ipamdriverterraform/53121388/Fetching%20Data%20for%20a%20Network%20Object"
format: markdown
---
<span style="color: #24292e">You can fetch information such as network ID (_ref) and name for a network from NIOS to Terraform </span><span style="color: #000000">using the </span>`infoblox_network`<span style="color: #000000"> data source block.</span>

<span style="color: #000000"> </span><span style="color: #000000">The following table describes the parameters that are used to fetch the data:</span>

| **<span style="color: #000000">Sr No.</span>** | **<span style="color: #000000">Parameter</span>** | **<span style="color: #000000">Mandatory/Optional</span>** | **<span style="color: #000000">Description</span>** |
| --- | --- | --- | --- |
| 1 | <span style="color: #000000">network_view_name</span> | <span style="color: #000000">Optional</span> | <span style="color: #000000">Specifies the network view name. If a network view is not specified, the provider considers the default network view.</span> |
| 2 | <span style="color: #000000">network_name</span> | <span style="color: #000000">Computed</span> | <span style="color: #000000">Specifies the network name that is fetched from the data source.</span> |
| 3 | <span style="color: #000000">cidr</span> | <span style="color: #000000">Mandatory</span> | <span style="color: #000000">Specifies the network block in </span>`cidr`<span style="color: #000000"> format.</span> |
| 4 | <span style="color: #000000">tenant_id</span> | <span style="color: #000000">Mandatory</span> | <span style="color: #000000">Specifies the unique identifier of the tenant in the cloud in which the network exists.</span> |

## <span style="color: #000000">Example</span>

<span style="color: #000000">As a prerequisite, you must have a network before you can fetch the data. If a network does not exist, use the </span>`infoblox_network`<span style="color: #000000"> resource block to create a network as explained in </span>*[<span style="color: #000000">Creating a Resource Network in a NIOS Appliance</span>](https://infoblox-docs.atlassian.net/wiki/spaces/ipamdriverterraform/pages/53154189)*<span style="color: #000000">.</span>

<span style="color: #000000">Use the </span>`data`<span style="color: #000000"> block to fetch the data:</span>

`data "infoblox_network" "test"`

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