---
title: "infoblox_ipv4_network_container Data Source"
canonical: "https://docs.infoblox.com/space/ipamdriverterraform/115933842/infoblox_ipv4_network_container%20Data%20Source"
format: markdown
---
Use the infoblox_ipv4_network_container data source to retrieve the following information about an IPv4 network container resource from the corresponding object in NIOS:

| **Parameter** | **Description** | **Example** |
| --- | --- | --- |
| `network_view` | <span style="color: #1f2328">The network view in which the network container exists.</span> | `nondefault_netview` |
| `cidr` | <span style="color: #1f2328">The IPv4 network block of the network container, in CIDR notation.</span> | `19.17.0.0/17` |
| `comment` | A description of the network container. This is a regular comment. | `Tenant 1 network container` |
| `ext_attrs` | The set of extensible attributes of the network container, if any. The content is formatted as a string of JSON map. | `{\"Administrator\":\"jsw@telecom.ca\"}` |

To retrieve information about IPv4 network containers 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 IPv4 network containers in the NIOS Grid.

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

| **Parameter** | <span style="color: #000000">**Alias***</span> | **Description** |
| --- | --- | --- |
| `network` | `cidr` | Specifies the IPv4 network block of the network container. |
| `network_view` | `network_view` | Specifies the network view in which the network <span style="color: #000000">container</span> exists.  
If a value is not specified, matching objects are retrieved from all network views in the NIOS Grid. |
| `comment` | `comment` | Describes the network container. |
| <span style="color: #000000">Extensible Attributes</span> | <span style="color: #000000">-</span> | <span style="color: #000000">Specifies the extensible attributes specified for the network container. You must specify the</span> key/value pair within the `filters` argument.  
Example:  
`filters = {`  
`"*Site" = "some test site"`  
`}` |

<span style="color: #172B4D">*</span><span style="color: #172B4D">Aliases are the parameter names used in the prior releases of Infoblox IPAM Plug-In for Terraform. Do not use the alias names for parameters in the data source blocks. Using them can result in error scenarios</span><span style="color: #172B4D">.</span>

## Example of the IPv4 Network Container Data Source Block

`resource "infoblox_ipv4_network_container" "nearby_org" {`  
`    cidr = "192.168.128.0/17"`  
`    network_view = "separate_tenants"`  
`    comment = "one of our clients"`  
`    ext_attrs = jsonencode({`  
`      "Site" = "remote office"`  
`      "Country" = "Australia"`  
`    })`  
`}`  
`data "infoblox_ipv4_network_container" "nearby_nc" {`  
`    filters = {`  
`      network_view = "separate_tenants"`  
`      network = "192.168.128.0/17"`  
`    }`  
`    // This is just to ensure that the network container has been be created`  
`    // using 'infoblox_ipv4_network_container' resource block before the data source will be queried.`  
`    depends_on = [infoblox_ipv4_network_container.nearby_org]`  
`}`

`output "nc_res" {`  
`    value = data.infoblox_ipv4_network_container.nearby_mc`  
`}`

`// accessing individual field in results`  
`output "nc_cidr_out" {`  
`    value =data.infoblox_ipv4_network_container.nearby_nc.results.0.cidr //zero represents index of json object from results list`  
`}`


`// accessing IPv4 Network Container through EA's`  
`data "infoblox_ipv4_network_container" "nc_ea" {`  
`    filters = {`  
`      "*Site" = "GMC Site"`  
`      "*Site!" = "Official site"`  
`    }`  
`}`

`// throws matching IPv4 Network Containers with EA, if any`  
`output "nc_ea_out" {`  
`    value = data.infoblox_ipv4_network_container.nc_ea`  
`}`